jeddik
11-13-2006, 01:46 PM
Hello
In my php/sql script below, should I use brackets with the OR ?
I want the confirm field to be either 'y' or it can be 's'.
Thanks for your help :)
$sql = "SELECT * FROM $section
WHERE feature in(' ','')
AND confirm = 'y' OR confirm = 's'
AND offwant = '$N_ow'
AND expire_date >= $today
Should it be written like this ?
$sql = "SELECT * FROM $section
WHERE feature in(' ','')
( AND confirm = 'y' OR confirm = 's' )
AND offwant = '$N_ow'
AND expire_date >= $today
In my php/sql script below, should I use brackets with the OR ?
I want the confirm field to be either 'y' or it can be 's'.
Thanks for your help :)
$sql = "SELECT * FROM $section
WHERE feature in(' ','')
AND confirm = 'y' OR confirm = 's'
AND offwant = '$N_ow'
AND expire_date >= $today
Should it be written like this ?
$sql = "SELECT * FROM $section
WHERE feature in(' ','')
( AND confirm = 'y' OR confirm = 's' )
AND offwant = '$N_ow'
AND expire_date >= $today