WRInaute discret
Salut, qqn saurait résoudre cette énigme ?
You have an error in your SQL syntax near ' LastVisit=1049141320) AND (start_time > 1049137724) AND (remote_ip = xxx.' at line 1
Error doing DB query in get_userid_from_session()
Bien sûr j'ai remplacé mon ip par les "xxx".
[/code]
You have an error in your SQL syntax near ' LastVisit=1049141320) AND (start_time > 1049137724) AND (remote_ip = xxx.' at line 1
Error doing DB query in get_userid_from_session()
Bien sûr j'ai remplacé mon ip par les "xxx".
Code:
function get_userid_from_session($sessid, $cookietime, $remote_ip, $db) {
$mintime = time() - $cookietime;
$sql = "SELECT user_id FROM sessions WHERE (sess_id = $sessid) AND (start_time > $mintime) AND (remote_ip = '$remote_ip')";
$result = mysql_query($sql, $db);
if (!$result) {
echo mysql_error() . "<br>\n";
die("Error doing DB query in get_userid_from_session()");
}