I have created an array in php containing a few USER_IDs. I am using mysql database having a table named USERS. Now I want to select only those rows from USERS whose user_id is matched with USER_IDs in the array.
Thanks in advance
|
PHP/MYSQL using an array in WHERE clause |
|||||
|
This assumes your user ids are integers, rather than strings which must be quoted and escaped. In that case,
|
|||||||||||||
|
The
OUTPUTS
|
||||
|