简体   繁体   中英

Php Mysql find in set query /// i want to convert this query in laravel query builder

select * from settings where setting_type='admin_privilege' and FIND_IN_SET ('001',`setting_value`) and br_id=4

You can do this:

DB::table('settings')
    ->where('setting_type', 'admin_privilege')
    ->where('br_id', 4)
    ->whereRaw("FIND_IN_SET ('001',`setting_value`)")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM