Re: To count number of visits to a particular wesite using login-id and password

From: Date: Fri, 05 Aug 2005 12:09:21 +0000
Subject: Re: To count number of visits to a particular wesite using login-id and password
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-220062@lists.php.net to get a copy of this message
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

« previous php.general (#220062) next »