Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
05-09-2014, 05:53 AM #1
- Join Date
- Apr 2014
- Thanked 0 Times in 0 Posts
Doing a simple SQL query in php so i can run as a cron
So what i thought would be easy, turns out i have no idea. I can post to a form and change data not a problem. I have never had to just run a query from a php file as soon as its loaded ( so i can set up this file to run as a cron job ).
The MYSQL query i have is: update job_queue set status = replace(status, "running", "done")
But i have no idea how to put that onto a php page to run as soon as the php file is executed.
Any help would be greatly appreciated.
05-09-2014, 02:27 PM #2
- Join Date
- Feb 2011
- Your Monitor
- Thanked 525 Times in 512 Posts
- Blog Entries
The same way you would a normal query in a html / php script but without any html or other output.
See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/
Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!