Jump to content

[SOLVED] PHP And Mysql


Minase

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.