In error logs:
Code:
[17-Feb-2009 21:06:59] PHP Fatal error: Call to a member function Execute() on a non-object in /home/kylegilb/public_html/lisasdesigns/shop/includes/functions/sessions.php on line 61
Code:
function _sess_write($key, $val) {
global $db;
global $SESS_LIFE;
$expiry = time() + $SESS_LIFE;
$value = $val;
$qid = "select count(*) as total
from " . TABLE_SESSIONS . "
where sesskey = '" . zen_db_input($key) . "'";
$total = $db->Execute($qid);
if ($total->fields['total'] > 0) {
$sql = "update " . TABLE_SESSIONS . "
set expiry = '" . zen_db_input($expiry) . "', value = '" . zen_db_input($value) . "'
where sesskey = '" . zen_db_input($key) . "'";
return $db->Execute($sql);
} else {
$sql = "insert into " . TABLE_SESSIONS . "
values ('" . zen_db_input($key) . "', '" . zen_db_input($expiry) . "', '" .
zen_db_input($value) . "')";
return $db->Execute($sql);
}
}
Thats the only error.
Bookmarks