problems with mysql "or"
- by Simon
i have a problem with "and" "or" syntax!!!
here is my query. . .
SELECT
`act1`.`name`,
`act1`.`surname`,
`act2`.`name`,
`act2`.`surname`,
`act3`.`name`,
`act3`.`surname`
FROM
videos,
actors AS act1,
actors AS act2,
actors AS act3
WHERE
videos.ident = 'somethink'
AND
(
act1.id = videos.id_actor1
OR
act2.id = videos.id_actor2
OR
act3.id = videos.id_actor3
)
it returns me all variations of {name, surname}, but why!!!
i want the name and surname of first axactly, second and thirth, if they exist!!!
halp me please