Scheduling php script in phpMyAdmin 3.3.8.1

2019-04-16 03:46发布

问题:

I have the following php script that I need to schedule to run in phpmyadmin. I am using a cron to run it but its not updating the table. It is not giving me an error either so I am sure something is wrong with my php file. Here is the code.

<?php
mysql_connect("xxxx", "xxxx", "xxxx") or die(mysql_error());
mysql_select_db("xxxx") or die(mysql_error());

$query = "update events 
INNER JOIN tblfeatureddj 
ON events.id_user = tblfeatureddj.id_user 
set trending ='2'";

?>

回答1:

You can indeed schedule events from within phpMyAdmin (provided you have the proper permissions, of course). From within your database, click the Events tab. From there, you can add a new event (and turn on the "Event scheduler status" button, if the scheduler is turned off). Something like this should do nicely for you: