Can someone help?
I run this query:
$result = mysql_query("SELECT pin FROM tblGsm WHERE gsmtype ='$gsmtype' AND amount='$amount' LIMIT 1") or exit('Returned Error: '.mysql_error());
echo mysql_num_rows($result)." rows were returned for query 'SELECT pin FROM tblGsm WHERE gsmtype ='$gsmtype' AND amount='$amount' LIMIT 1'<br>";
mysql_query('DELETE FROM tblGsm WHERE pin='.$pin);
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '$result = mysql_query("SELECT pin FROM tblGsm WHERE gsmtype ='$
Can't spot where the error is:
I think but I'm not sure that you will need to use backticks around your columname pin like so `pin`. IN is a reserved word in mysql, I'm guessing that mysql is thinking you mean:
and thus thinks you have a syntax error because the two are running together.
See if that helps you.
Thanks. The script is ok. I just discovered that I used the wrong variable.
Thanks Dave L.