I have a PHP script that is called from PayPal IPN. When a user purchases something form my site, the IPN PHP script creates the user in the mysql database. At a later time, 24hrs, that user needs to be deleted from the database. I assume that using the "at" command would work. I believe the problem I am running into is regarding the parentheses in my command.
<?php
$email = "[email protected]";
$cmd = 'mysql -u username -pPassword -e `DELETE FROM db.users WHERE users.email = "$email";`|at tomorrow';
exec($cmd);
?>
If I run this page as-is, it throws the following error:
warning: commands will be executed using /bin/sh
sh: 1: DELETE: not found
mysql: option '-e' requires an argument
job 38 at Sun Feb 8 04:59:00 2015
That is what is leading me to believe there is a problem with my quotes and parentheses.
mysqli
function set? That's what they're there for – Machavity Feb 8 '15 at 3:51