mardi 23 février 2016

find in set in laravel ? example

I am new in laravel. My query is i need to find out value from comma separated field.

Here is my table.

Table name :- tags_value

| id  | tags         
| --- | ------------ 

| 1   | css,html,php 

| 2   | php,java,css      

| 3   | java,c++,ios 

My sql query :-

 $query = DB::table('tags_value')
          ->whereRaw(FIND_IN_SET('css',Tags))
          ->get();

but its not working.

Please help me for solve this problem.

Thanks in advance



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire