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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php