You are here: Re: [PHP] To count number of visits to a particular wesite using login-id and password « PHP « IT news, forums, messages
Re: [PHP] To count number of visits to a particular wesite using login-id and password

Posted by Miles Thompson on 08/05/05 15:09

At 08:41 AM 8/5/2005, suma parakala wrote:
>Hi
>I am new web application development. Can anyone tell me how can I trace
>how many times mywebsite has been viewed by one particular login and
>password using postgresql database and php
>Thanks
>Suma

Since you are presumably authenticating against a user table in the
database, add a login_count field and increment it when the user logs in.
That will track all your users. Then execute a query to fetch the data for
a particular user. Hint SELECT COUNT() ...

If you want a profile of activity, add a separate table with timestamp, and
user_id fields, the user_id having user.user_id as its foreign key. For
each login, insert a record in this table, and as it's PostgreSQL you can
set a trigger to automatically write the timestamp. Now you can track your
usage profile by users, time of day, user and time of day .... fun isn't it?

Regards - Miles Thompson

 

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

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