MySQL interesse |
|
Ik heb deze query:
SELECT c.*, m.name AS naam, m.sex AS sex, m.breeding AS breeding, m.size AS size, m.pic1 AS pic1, m.pic2 AS pic2, m.information AS information, m.link AS movie
FROM customer AS c, movie AS m
WHERE c.user = "Chilion"
AND c.pass = "e110fb45bc4f7cc5d367b06bfbc8e5c3"
AND c.movie1 = m.id
OR c.movie2 = m.id
OR c.movie3 = m.id
SELECT c.*, m.name AS naam, m.sex AS sex, m.breeding AS breeding, m.size AS size, m.pic1 AS pic1, m.pic2 AS pic2, m.information AS information, m.link AS movie FROM customer AS c, movie AS m WHERE c.user = "Chilion" AND c.pass = "e110fb45bc4f7cc5d367b06bfbc8e5c3" AND c.movie1 = m.id OR c.movie2 = m.id OR c.movie3 = m.id
Nou wil ik dus dat hij altijd matcht of er in c.movie2 en c.movie3 een m.ID zit.
Als die erin zit, moet hij die ook meenemen, naast c.movie1 die altijd meegenomen word.
|