Here is my php page which is called on button click.
<?php
$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="parth"; // Database name
$con = mysql_connect("localhost","root","") or die('Could not connect to MySQL server: ' . mysql_error());
//echo"Connected to MySQL server";
mysql_select_db("parth") or die('Could not connect to database' . mysql_error());
//echo "Connected to Database";
$sql="CREATE EVENT gold ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 3 SECOND
DO
DELETE FROM table LIMIT 1;";
mysql_query($sql);
echo "done";
?>
the echo message "done" is displayed
But the event query does not get executed. I have given the privileges too. Just used 3 SECOND for development purpose.
Try this: