O
O
Outoverlay2016-01-19 16:20:30
PHP
Outoverlay, 2016-01-19 16:20:30

Get desired values ​​from id of specific mysql table?

There is a table in it, for example, there is an id 1,2,3,4,5,6,10,22,25. How to Select for example id 1,5,10 in one request.
I tried several ways, it turned out, only through WHERE `id` = 1 OR `id` = 5 OR `id` = 10;
Is there an easier way?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
IceJOKER, 2016-01-19
@Outoverlay

WHERE id IN (1,3,6,8,11,999,1000000)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question