Advertisement
kushal33

how to find comma seperated column value from mysql

Sep 28th, 2015
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. how to find comma seperated values in mysql
  2.  
  3. SELECT *
  4. FROM `vendor_master`
  5. WHERE vendor_type =2
  6. AND FIND_IN_SET( 1, work_type )
  7. LIMIT 0 , 30
  8.  
  9. ArrayHelper::map(self::find()->where('vendor_type='. self::KARIGAR.' AND find_in_set('.$type.',work_type) ')->all(), 'id','name');
  10.  
  11. select * from shirts where ',' + colors + ',' like '%,1,%'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement