I am new in laravel. My query is i need to find out value from comma separated field.
Here is my table:
tags_value
╔════╦══════════════╗
║ id ║ tags ║
╠════╬══════════════╣
║ 1 ║ css,html,php ║
║ 2 ║ php,java,css ║
║ 3 ║ java,c++,ios ║
╚════╩══════════════╝
This is my SQL query:
$query = DB::table('tags_value')
->whereRaw(FIND_IN_SET('css', Tags))
->get();
but it's not working.
Please help me to solve this problem. Thanks in advance.
FIND_IN_SET()
, which does not exist. Escape the entirewhereRaw
clause in quotes. – Tim Biegeleisen