Whats the right sql syntax


#1

Please folks whats the right sql syntax
$query = 'DELETE FROM ‘registration’ WHERE ‘trnxid’=" . $txRef ; '."";

please anyone help


#2

$query = “DELETE FROM registration WHERE trnxid=’” . $txRef + “’”;
Remember to sanitize user input by escaping its content to prevent SQL injection.
e.g.
$txRef = mysql_real_escape_string($txRef);

Later :slight_smile:


#3

thanks @vicsstar. I got that