That's fine, I see you're explaining crontab, and I think I can safely say anyone who's been here a while already knows about it anyway...
Printable View
That's fine, I see you're explaining crontab, and I think I can safely say anyone who's been here a while already knows about it anyway...
Matheusben said: "Tutorial Please install that script please :S no understood crontab :s"
...
I know
...
And you said: "anyone who's been here a while already knows about it anyway..."
'-'
renan7899 Mano desblock msn la.
I checked your script... there are some things unnecessary, and there are some errors too. "mysql_query(preparew)"... It should be "mysql_query(prepare_w)" (With a underline).
I'll remake the script here:
PHP Code:<?php
error_reporting(0); //I don't like this crap reporting my server IP... the mysql errors is enough for the users.
$Host = "192.168.1.64"; // localhost or your IP
$User = "root"; // Database user
$Password = "renan"; // Database password
$Amount = "45000"; // how much zen you want to add *100
$Link = mysql_connect($Host, $User, $Password) or die ("<center><b>Database connection error.</b>");
$dbc = mysql_select_db("dbo", $Link) or die(mysql_error());
$prepare_w = mysql_query("SELECT * FROM users ORDER BY ID ASC") or die (mysql_error());
$top_num = 0;
$data = date("Y/m/d H:i:s");
$query_sn = "SELECT sn FROM usecashnow";
$sn = mysql_query($query_sn);
if(mysql_num_rows($sn) <= 0) { $sn = "-1"; }
while($array = mysql_fetch_array($prepare_w))
{
$id = $array["ID"];
$top_num++;
$uweb = mysql_query("INSERT INTO usecashnow (userid, zoneid, sn, aid, point, cash, status, creatime) VALUES ('$id', '1', '$sn', '1', '0', '$Amount', '1', '$data')") or die (mysql_error());
$sn--;
}
echo "Updated $top_num Rows";
mysql_close($Link);
?>
i made this now i dont use cubi ^^ but ty
There's an error...
http://i53.tinypic.com/15f40uv.jpg.
The php file was splitted in a lot of parts... why??