mysql - How to get MultiValued Attribute in SQL -


i want users admin user_info table. in user_info table groups column ins multivalued attribute. i've tried is:

 select * user_info 'admin' in split(',',groups); 

i error:

1064 - have error in sql syntax; check manual corresponds mysql server version right syntax use near 'split(',',groups)

user_info table

username     |   groups         | --------------------------------- abc@mail.com |   superadmin,admin 

groups table

 groupid(autoincr)     |   groups         | --------------------------------- 1                      |   superadmin     | 2                      |   admin          | 

you try:

select *    user_info   find_in_set('admin', groups); 

really tho, crutch around fundamentally broken design.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -