405 $db = DB::getHandle(); 406 $sessid = $this->_sessionKey; 407 $val=base64_encode($val); 408 $s="UPDATE lcSessions SET username= '".$this->username."', sessdata = '".$val."' WHERE sesskey = '".$sessid."'"; 409 if ($this->username == "anonymous" ) { 410 $s="UPDATE lcSessions SET sessdata = '".$val."' WHERE sesskey = '".$sessid."'"; 411 } 412 if (!$db->query($s,true)) { 413 //no update record, try insert 414 $s="INSERT into lcSessions (username,sessdata,sesskey) values ('".$this->username."','$val','$sessid')"; 415 if ($this->username == "anonymous" ) { 416 $s="INSERT into lcSessions (sessdata,sesskey) values ('$val','$sessid')"; 417 } 418 $db->query($s,true); 419 } 420 echo "strlen = ".strlen($val)."
\n"; 421 $db->queryOne('select sessdata from lcSessions where sesskey = "'.$sessid.'"'); 422 echo "strlen = ".strlen($db->record['sessdata'])."
\n"; 423 echo "val = ".$val."
\n"; 424 echo "val = ".$db->record['sessdata']."
\n"; 425 echo "

\n"; 426 echo "query is = ".$s; 427 $db->query('COMMIT'); 428 $db->disconnect(); 429 exit(); Lc_Lob_Test Object ( [type] => test [questionObjs] => Array ( [0] => who ) [mime] => X-LMS/test [repoObj] => LobRepoEntry Object ( [_new] => 1 [_modified] => [_version] => 1.6 [_entityVersion] => [lobRepoEntryId] => [lobGuid] => [lobTitle] => [lobType] => [lobSubType] => [lobMime] => [lobDescription] => [lobNotes] => [lobUrltitle] => [lobVersion] => [lobBytes] => [__attributes] => Array ( [lobRepoEntryId] => integer [lobGuid] => varchar [lobTitle] => varchar [lobType] => varchar [lobSubType] => varchar [lobMime] => varchar [lobDescription] => text [lobNotes] => longtext [lobUrltitle] => varchar [lobVersion] => integer [lobBytes] => integer ) [__nulls] => Array ( [lobDescription] => lobDescription [lobNotes] => lobNotes ) ) [lobSub] => LobTest Object ( [_new] => 1 [_modified] => [_version] => 1.6 [_entityVersion] => [lobTestId] => [lobRepoEntryId] => [__attributes] => Array ( [lobTestId] => integer [lobRepoEntryId] => integer ) [__nulls] => Array ( ) ) [lobMetaObj] => LobMetadata Object ( [_new] => 1 [_modified] => [_version] => 1.6 [_entityVersion] => [lobMetadataId] => [lobRepoEntryId] => [subject] => [subdisc] => [author] => [copyright] => [license] => [userVersion] => [status] => [updatedOn] => [createdOn] => 1191607148 [__attributes] => Array ( [lobMetadataId] => integer [lobRepoEntryId] => integer [subject] => varchar [subdisc] => varchar [author] => varchar [copyright] => varchar [license] => varchar [userVersion] => varchar [status] => varchar [updatedOn] => integer [createdOn] => integer ) [__nulls] => Array ( ) ) )