Quote:
Originally Posted by Marco van Herwaarden
|
ok thank you for the tip, i have figured some of this out when i run the following querry in phpWebAdmin then it lists what im looking for.
Code:
select * from vb_user where FIND_IN_SET ( '6', membergroupids ) > 0";
but when i use it in a php querry then it gives a invalid sql syntanx
PHP Code:
$db->query("select * from ".TABLE_PREFIX."user where FIND_IN_SET ( '" . $_POST['usergroup'] . "', membergroupids ) > 0");
EDIT SOLVED:
After playing around with it for awhile i found this which works
PHP Code:
$db->query_read("SELECT * FROM ".TABLE_PREFIX."user as a WHERE FIND_IN_SET('{$_POST['usergroup']}', a.membergroupids) ");