mcmuney Posted September 28, 2006 Share Posted September 28, 2006 When I add OR function to this query, it doesn't work, what am I doing wrong?ORIGINAL[code] $sel_image="select scm_mem_id,sci_url FROM sc_member_images WHERE sci_slogan<>'M' ORDER BY sci_id DESC";[/code]WITH OR STATEMENT[code] $sel_image="select scm_mem_id,sci_url FROM sc_member_images WHERE (sci_slogan<>'M' OR sci_slogan<>'D') ORDER BY sci_id DESC";[/code] Link to comment https://forums.phpfreaks.com/topic/22402-or-function/ Share on other sites More sharing options...
Barand Posted September 28, 2006 Share Posted September 28, 2006 I believe you really mean[code]WHERE (sci_slogan<>'M' AND sci_slogan<>'D')[/code]or[code]WHERE sci_slogan NOT IN ('M', 'D')[/code]NOT (M OR D) = NOT M AND NOT D Link to comment https://forums.phpfreaks.com/topic/22402-or-function/#findComment-100518 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.