Hi there,
is it possible to pass a PHP array to get some data matching in a Mysql Table?
lets say i have a list of names that i get from PHP into an array:
and i want to know which of these are in my Table.
could i do:
i don't know if mysql can make it..
is there a way to perform this?
thank you,
best regards
is it possible to pass a PHP array to get some data matching in a Mysql Table?
lets say i have a list of names that i get from PHP into an array:
Code:
$php_array = array(0=>'john', 1=>'marcus', 2=>'robert', 3=>'samuel'...)
could i do:
Code:
SELECT user_id FROM users WHERE user_name IN ($php_array)
is there a way to perform this?
thank you,
best regards
Comment