Author | Message | Time |
---|---|---|
R.a.B.B.i.T | OK now I'm mad. I'm having problems with my tracker. My code executes and updates everything EXCEPT logons and online. I've tried setting online to an enum('yes', 'no'), varchar('1'), int('1'), a lot of things, but no matter what it doesn't update. I've also changed how I update it: individually, with the rest, with a variable, as plain. online simply refuses to update! logons isn't as important right now, as online dictates the entire display of the tracker page: [code] function updateAddConnect($user, $server, $serverip, $product, $time, $master) { $online = "1"; $query = mysql_query("SELECT * FROM userlist WHERE username='$user'"); $cver = $_SERVER['HTTP_USER_AGENT']; if($query) { $logons = mysql_result($query, 1, "logons") + 1; $q_line = "UPDATE userlist SET"; } else { $logons = 1; $q_line = "INSERT INTO userlist"; } $q_line .= "server='$server', product='$product', time='$time', logons='$logons'"; $q_line .= " master='$master', verion='$version', online='$online' WHERE username='$user'"; $update = mysql_query($q_line); if($update) return true; return false; }[/code] [edit] By the way, the tracker isn't anything secret or sneaky, and is entirely disablable. | August 9, 2005, 7:01 AM |