Taylor_1978
09-09-2004, 02:19 PM
Hi All...
Just need a little help! I am getting a parse error and for the life of me I cannot find the problem. It states I have an unexpected ';' on line 39. NOTE: line 39 is $uid = $row[id]; BUT.. if i remove this line and run the script I get exactly the same problem!
Here is the script:
$indexloaded=1;
include("config/config.php");
include("$dir[func]/global.php");
include("$dir[func]/loginforms.php");
$currenttime = time();
// Open Check In
$result = mysql_query("SELECT date,status FROM t_info WHERE id='$tid'");
$row = mysql_fetch_array($result);
if ($row[status] == "Registration") {
$difftime = $row[date] - $currenttime;
if ($difftime < 1801) {
mysql_query("UPDATE t_info SET status='Check In' WHERE id='$tid'");
}
}
// Close Check In
$result = mysql_query("SELECT date,status FROM t_info WHERE id='$tid'");
$row = mysql_fetch_array($result);
if ($row[status] == "Check In") {
$difftime = $row[date] - $currenttime;
if ($difftime < 1) {
mysql_query("DELETE FROM t_players WHERE tid='$tid' AND status='0'");
$result = mysql_query("SELECT * FROM t_players WHERE id='$tid'");
$num = mysql_num_rows($result);
if ($num > 3) {
mysql_query("UPDATE t_info SET status='Playing' WHERE id='$tid'");
$result = mysql_query("SELECT id FROM t_players WHERE tid='$tid'");
while($row = mysql_fetch_array($result)) (
$uid = $row['id'];
$result1 = mysql_query("SELECT rank FROM ladder_$ladderon WHERE id='$uid'");
$row1 = mysql_fetch_array($result1);
mysql_query("UPDATE t_players SET rank='$row[rank]' WHERE id='$uid' AND tid='$tid'");
)
$result = mysql_query("SELECT id FROM t_players WHERE tid='$tid' AND status='1' ORDER BY rank");
while($row = mysql_fetch_array($result)) {
$seed++;
mysql_query("UPDATE t_players SET status='2', seed='$seed' WHERE id='$row[id]'");
}
include("$dir[func]/tbrackets.php");
tbrackets($tid,$num);
}
}
}
Any ideas?
Thanks in advance! :thumbsup:
Just need a little help! I am getting a parse error and for the life of me I cannot find the problem. It states I have an unexpected ';' on line 39. NOTE: line 39 is $uid = $row[id]; BUT.. if i remove this line and run the script I get exactly the same problem!
Here is the script:
$indexloaded=1;
include("config/config.php");
include("$dir[func]/global.php");
include("$dir[func]/loginforms.php");
$currenttime = time();
// Open Check In
$result = mysql_query("SELECT date,status FROM t_info WHERE id='$tid'");
$row = mysql_fetch_array($result);
if ($row[status] == "Registration") {
$difftime = $row[date] - $currenttime;
if ($difftime < 1801) {
mysql_query("UPDATE t_info SET status='Check In' WHERE id='$tid'");
}
}
// Close Check In
$result = mysql_query("SELECT date,status FROM t_info WHERE id='$tid'");
$row = mysql_fetch_array($result);
if ($row[status] == "Check In") {
$difftime = $row[date] - $currenttime;
if ($difftime < 1) {
mysql_query("DELETE FROM t_players WHERE tid='$tid' AND status='0'");
$result = mysql_query("SELECT * FROM t_players WHERE id='$tid'");
$num = mysql_num_rows($result);
if ($num > 3) {
mysql_query("UPDATE t_info SET status='Playing' WHERE id='$tid'");
$result = mysql_query("SELECT id FROM t_players WHERE tid='$tid'");
while($row = mysql_fetch_array($result)) (
$uid = $row['id'];
$result1 = mysql_query("SELECT rank FROM ladder_$ladderon WHERE id='$uid'");
$row1 = mysql_fetch_array($result1);
mysql_query("UPDATE t_players SET rank='$row[rank]' WHERE id='$uid' AND tid='$tid'");
)
$result = mysql_query("SELECT id FROM t_players WHERE tid='$tid' AND status='1' ORDER BY rank");
while($row = mysql_fetch_array($result)) {
$seed++;
mysql_query("UPDATE t_players SET status='2', seed='$seed' WHERE id='$row[id]'");
}
include("$dir[func]/tbrackets.php");
tbrackets($tid,$num);
}
}
}
Any ideas?
Thanks in advance! :thumbsup: