I store my sessions into MySQL database. The session data is serialized and stored to the DB cell.
The problem is following: the serialized object gets into database just partially. if I echo the query string, copy it and paste into phpMyAdmin->database query it gets into database full, as it should. "echo mysql_error" shows no errors. the encoding is not the reason, i have declared it strictly. here's the piece of the code i use.
$sql = "UPDATE sessions
SET SESSION_ID='$id', ACCESS='$access', DATA='".stripslashes($data)."', USER_ID='$username' WHERE SESSION_ID = '$id'";
echo("<br>".$sql."<br>");
return mysql_query($sql, $_sess_db);
echo mysql_error($_sess_db);
how can i fix it? and why does the same query work fine when i copy-paste into phpmyadmin but doesn't work as it should when executed via mysql_query function?