You are here: Re: Sessions « PHP Programming Language « IT news, forums, messages
Re: Sessions

Posted by C. (http://symcbean.blogspot.com/) on 01/22/08 09:32

On 22 Jan, 06:33, Pankaj <panah...@gmail.com> wrote:
> > oh... and... into the table... UID... One User One Sessid... if the
> > session is... time out...at the next UserLogin... You update her/his
> > rowin the session table ^_^ is not in this manner duplicating and it
> > is not necessary to deal with the unnecessary entries very much.
>
> I still have to update the table everytime I have to perform an
> operation any other table. My site typically has 300 users at any
> given instance and I need to check and update this table around 300
> times in 10 secs before I can work on any other table. This causes an
> unnecessary delay and load.

That's not a huge amount of traffic - if your DB schema is set up
properly there should be little difference compared with using files
for sessions.

> Whenever the user does something, I
> check the database to see if the session is active. If so, I update
> the date and time and then update the other tables.

If you're using PHP sessions and a database bound session handler....

The session should always be stored at the end of each request - if
you're writing the session data manually for each request then you're
doubling the workload. Also, the session will be loaded automatically
as soon as you call session_start() from your code - if (!
count($_SESSION)) then the user doesn't have a current session - no
need to refer to the database again.

C.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация