July 19th, 2000, 09:50 AM
Here's some of my code. The error is given in line 88, which is the second query, $query2.
$now = time();
$query = mysql_db_query($database,"SELECT in_access,eq_access FROM users WHERE login='$login'",$link_id);
$result = mysql_fetch_array($query);
$in_access = $result["in_access"];
$eq_access = $result["eq_access"];
$query2 = mysql_db_query($database,"UPDATE users SET time_in='$now', remote_addr='$REMOTE_ADDR' where login='$login'",$link_id);
echo "Error = " . mysql_error($link_id);
The exact error is:
Warning: MySQL: Unable to save result set in inc_functions.php on line 88
mysql_error() does not return anything, however. I just have it in there for debugging.
any ideas what I should/can do to fix this?
July 20th, 2000, 12:12 AM
Try to find out if the value in the time_in column is being set to zeros.
If so then MySQL doesn't see the $now as a valid time/date.
The time() function returns an integer number that equals the number of seconds passed since Jan. 1 1970. It doesn't return the time.
If you knew that I apologize.
If you have a DATE or TIME field why not use:
"UPDATE users SET time_in=now(), remote_addr='$REMOTE_ADDR' where login='$login'"
Try that first to see if it fixes it.
July 20th, 2000, 08:49 AM
The script works fine on a linux system, but now i'm trying to run it on solaris, and now i'm getting these problems. i'll look into the now() issue and see if that fixes anything. thanks...