Minase Posted June 28, 2008 Share Posted June 28, 2008 hy there,i was wondering how i can make an universal update script (cron job) i do know how to set it,but let me show the schema of my website. I have lets say 100 users ,in table users i have (Name , Money, Ratio) just an example Ratio can be from 1-1000 (doesnt matter anyway) how i can make the script to update all users not just 1 (i mean at every minute to make something like Money+Ratio) for all users in DB not just for the last one,and without user beign loged in (ofc). thank you Link to comment https://forums.phpfreaks.com/topic/112316-solved-php-and-mysql/ Share on other sites More sharing options...
ratcateme Posted June 28, 2008 Share Posted June 28, 2008 cant you just have a script like this #!/usr/bin/php <?php $query="SELECT * FROM `users`"; $result=mysql_query($query); while($row = mysql_fetch_array($result)){ //do something //will loop through all users } ?> and set that up as a cron job Scott. Link to comment https://forums.phpfreaks.com/topic/112316-solved-php-and-mysql/#findComment-576626 Share on other sites More sharing options...
Minase Posted June 28, 2008 Author Share Posted June 28, 2008 thank you very much Link to comment https://forums.phpfreaks.com/topic/112316-solved-php-and-mysql/#findComment-576627 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.