codrgii Posted March 2, 2010 Share Posted March 2, 2010 I'm looking to update a sql table using php, i wish for a php script to update and insert the time it was last ran so it inserts that time into a sql table, which php function is best suited for the job and would you mind showing an example of it? Link to comment https://forums.phpfreaks.com/topic/193879-update-script/ Share on other sites More sharing options...
Wolphie Posted March 2, 2010 Share Posted March 2, 2010 Put this at the top of your update script: <?php mysql_query(sprintf("UPDATE sometable SET column1 = %d", time())); ?> Every time the update script is ran, it'll update a specific column in a specific table with the current time the script was ran. Link to comment https://forums.phpfreaks.com/topic/193879-update-script/#findComment-1020352 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.