James.Q.L wrote:
before i had three fields in table sessions : a_session,id,time in the DB.

Did you add code of your own to update the time column?


and updating table etc from the program was working just fine. however, after i added 
one more
field (username) to the sessions table through phpmysql, updating it in the program
seems has no effect on the username record. no problem on others.

Do you understand what Apache::Session does? It simply use Storable to turn the whole hash of values into a single binary chunk and stores it all in the a_session field. It uses the id field to find the session again. It will not update any other fields unles syou hack the code yourself.


$session{'test'} = time(); ## this doesn't update 'test'

That updates the field "test" in the session, which is stored as part of the column a_session in the database.


$session{'uname'} = $uname if $uname; ## this doesn't update 'uname'

Same as above -- it updates the uname value of the session.


$session{'time'} = time(); ## this updates 'time' record

But it doesn't update the time column in the database unless you hacked the Apache::Session code to do that.


- Perrin



--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Reply via email to