JREAM Posted May 25, 2009 Share Posted May 25, 2009 How would you do an OR statement in MySQL? I can't find this on Google with an example in PHP. $sql = "SELECT * FROM $table WHERE `id`='10' || `id`='12'"; Link to comment https://forums.phpfreaks.com/topic/159524-solved-how-to-do-a-php-mysql-or-statement/ Share on other sites More sharing options...
garethhall Posted May 25, 2009 Share Posted May 25, 2009 Like so $sql = "SELECT * FROM $table WHERE `id`='10' OR `id`='12'"; Link to comment https://forums.phpfreaks.com/topic/159524-solved-how-to-do-a-php-mysql-or-statement/#findComment-841477 Share on other sites More sharing options...
JREAM Posted May 25, 2009 Author Share Posted May 25, 2009 LOL than kyou Link to comment https://forums.phpfreaks.com/topic/159524-solved-how-to-do-a-php-mysql-or-statement/#findComment-841480 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.