samedi 27 juin 2015

Select multiple rows with multiple matching id(s)

Is there a way to query data to display multiple rows with multiple selector?

like:

SELECT * FROM `book` WHERE `book`.id = 1 AND `book`.id = 2;

table:

id name
1  book1
2  book2
3  book3
4  book4

I dun suppose looping for each id is favourable.

Aucun commentaire:

Enregistrer un commentaire