php - MySQL query with multiple 'OR' statements -
i have query, have tested outside of php directly on sql , still getting same problem
the idea being $currentartist sent through using method, value matches value in event_artist
columns information displayed.
select * `".dbn."`.`events` `event_artist1` or `event_artist2` or `event_artist3` = '".$currentartist."' ";
the problem have is ignoring where
part of query. returns complete table results , not results match $currentartist
.
i have tested $currentartist
, works fine. i'm @ loss how complete statement work.
i've tried surrounding or
statements in brackets in:
(`event_artist1` or `event_artist2`...) = '".$currentartist."'
this returns result if $currentartist
equal "1" being first person in artists table information stored.
any appreciated.
select * events e '$currentartist' in (e.event_artist1,e.event_artist2,e.event_artist3);
Comments
Post a Comment