MySQL query with multiple 'OR' statements

后端 未结 3 410
粉色の甜心
粉色の甜心 2021-01-27 11:39

I have a query, that I have tested outside of PHP directly on SQL and still getting the same problem

The idea being that $currentArtist is sent through using the GET met

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-27 12:14

    SELECT *
    FROM `".DBN."`.`events`
    WHERE `event_artist1` = '".$currentArtist."' 
    OR `event_artist2` = '".$currentArtist."' 
    OR `event_artist3` = '".$currentArtist."'
    ";
    

    Hope this helps.

提交回复
热议问题