var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Counting DB Requests
I have a mysql database set up for my website so members can register and log in to view members only pages.
I want to be able to see how many times people login and the amount of time they are logged in.
How can I set it up so that everytime the table info is requested(user logs in) it increments a value in a different column.
I really don't know how to even start with keeping track of the time logged in so any suggestions would be appreciated.
Confused and a little frustrated
how do you validate their credentials when they log in?
do you have a table which contains their userid and password?
I set up the validating with dreamweaver, with server behaviors.
When they sign up, it inserts the form info in the table, and to log on, it checks to see if the form data is there or not.
I have a table set up with the userid, first name, last name, and email.
I'm using the first name and email instead of a password.
Thanks for the reply
could you do a SHOW CREATE TABLE for the table please?
Here you go.
I switched to my listmail users table so this is what I'm using currently
Generation Time: Jan 19, 2009 at 08:06 PM
Generated by: phpMyAdmin 22.214.171.124 / MySQL 5.0.67-community
SQL query: show create table lm_users ;
Table Create Table
lm_users CREATE TABLE `lm_users` (
`id` mediumint(9) unsigned NOT NULL auto_increment,
`uid` varchar(7) NOT NULL,
`fname` tinytext NOT NULL,
`lname` tinytext NOT NULL,
`email` varchar(255) NOT NULL,
`dateadd` date NOT NULL,
`refurl` varchar(75) NOT NULL,
PRIMARY KEY (`id`),
KEY `uid` (`uid`),
KEY `email` (`email`)
) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=utf8
you can add the login_counter column to your table like this:
Originally Posted by
ALTER TABLE lm_users
ADD COLUMN login_counter MEDIUMINT NOT NULL DEFAULT 0
you're on your own to get it updated via dreamweaver, though
by the way, your KEYs on uid and email should probably be UNIQUE KEYs
Alright, thanks for the tips. I appreciate it.
I'll get it working eventually I always do