I have a problem that I have been staring at all day and just can't figure it out. Here is what I am trying to execute;
$query="SELECT * FROM codes WHERE code = '$_POST
' && used <> 'x'";
$result = mysql_query($query) or die (mysql_error());
if (mysql_num_rows($result) <> 0)
{ //allow discount }
here is the database;
code used
harley08
harley88 x
If I remove the && used <> 'x' and look for coed='harley08', then I get one row returned, but with it in there i get 0 rows?????? Both fields are character fields.
Any ideas???