A
A
Abc Edc2014-11-10 09:12:56
PHP
Abc Edc, 2014-11-10 09:12:56

Is there a query like WHERE `id` = `1`,`2`,`3`,`4`,`5` ?

Is there a query in mysql like SELECT `name` FROM `user` WHERE `id` = `1`,`2`,`3`,`4`,`5`;
Or is it necessary to sort through the entire array in a cycle in php with requests?
or maybe it's better to choose all the names in general (of which there will be few of course, but suppose that there are at least a thousand of them) and then compare?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2014-11-10
@gleber1

IN
WHERE `id` IN ('1', '2', '3', '4', '5')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question