Hello,

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>";
$pin=mysql_result($result, 0);
mysql_query('DELETE FROM tblGsm WHERE pin='.$pin);

I get:

#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: