--- branches/pear-db/admin/include/sessionClass.php 2004/03/05 23:38:19 52 +++ branches/pear-db/admin/include/sessionClass.php 2004/03/06 00:33:16 53 @@ -90,22 +90,17 @@ $time_human = $year . "-" . $mon . "-" . $mday . " " . $hours . ":" . $minutes . ":" . $seconds; // Build the SQL line to insert it into the database - $sql = "INSERT INTO session (staff_account, user_ip, session_id, time_human, time_unix, time_expire) VALUES ('" - . $staff_account - . "', '" - . $user_ip - . "', '" - . $session_id - . "', '" - . $time_human - . "', '" - . $time_unix - . "', '" - . $time_expire - . "')"; + $sql = "INSERT INTO session (staff_account, user_ip, session_id, time_human, time_unix, time_expire) + VALUES (?, ?, ?, ?, ?, ?)"; // xx_query ("LOCK TABLE session WRITE", $this->con_session); - if (!xx_query($sql, $this->con_session)){ + if (!xx_prepare_execute($sql, + $staff_account, + $user_ip, + $session_id, + $time_human, + $time_unix, + $time_expire)) { xx_query ("UNLOCK TABLES", $this->con_session); $this->bailout(); }