You can use a field named as "updated" in which you place the time when the
user login, and by ajax call after every 2 min or whatever suites you to
change that updated filed by current time-stamp.
On chat site check that if the updated field is more than 2min older, if yes
then delete that row.
I hope this mail will help you.

Regards
Hashim Ikram

On Mon, Aug 16, 2010 at 9:26 PM, Davor Ilic <webfa...@gmail.com> wrote:

> DonĀ“t know how cron is working. do you know good tutorials about this
> thema.
>
> 2010/8/16 Zaky Katalan-Ezra <procsh...@gmail.com>
>
> Ping the database for every 20 sec with AJAX and in every new page load.
>> In every ping update the session modified column.
>> In chat check if a session exists and if the modified value is newer the
>> 40 sec.
>> Delete the session row at logout and run cron every hour to delete dead
>> sessions in order to keep the table "clean"
>>
>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>For
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to