How do I use a variable in DELETE FROM subscribe WHERE statement?
How do I use a variable in DELETE FROM subscribe WHERE statement?
$sql = "INSERT INTO subscribe (email) VALUES ('$email')"; works.
$sql = DELETE FROM subscribe WHERE email = $email; errors out.
I tried SET @email = $email;
Then $sql = DELETE FROM subscribe WHERE email = @email;
Parse error: syntax error, unexpected '@' in /home/birdbr7/public_html/scripts/welp.php on line 49
Robert
Hello Robert, unfortunately, while our support is limited in this area, I have found some information that may assist at https://stackoverflow.com/questions/61818093/delete-from-variable-name