Just for fun, I'm constructing a small community...
When someone logs in I register what time they logged in and saves the info in a database using the field:
Name: "latastlogin"
Type: timestamp(14)
Null: Yes
So when they log in I just make a call to mysql
UPDATE tablename SET latestlogin=NULL WHERE username='$global_username'
In the same table I got a field that looks like this:
Name: "latastaction"
Type: timestamp(14)
Null: Yes
I use that field to register when a user loads a new page. (I need that info so I know can log out people that have been inactive for too long)...
I use the same call here except that I changed "latestlogin" to "latestaction":
UPDATE tablename SET latestaction=NULL WHERE username='$global_username'
The problem is that when I make this call, for some reason, it also updates the "latestlogin"-field...
I've looked through the code billions of times even if the only call I make is:
UPDATE tablename SET latestaction=NULL WHERE username='$global_username'
It still updates the latestlogin field.
Just updating the latestlogin field and NOT the latestaction field works fine, but not the other way around...
The only way I got it working was if I ran the query like this:
UPDATE tablename SET latestlogin=latestlogin, latestaction=NULL WHERE username='$global_username'
But that's a disturbing "work-around"...
any ideas?