Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,159,206 members, 7,839,109 topics. Date: Friday, 24 May 2024 at 01:54 PM

How Can I Run The Mysql Update - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / How Can I Run The Mysql Update (560 Views)

Which Internet Provider Should I Use To Run The Backend Of My Site... / How Do I Run An Email Service On A Website: What Is Needed / How Do I Run A Free Email Service On A Website? (2) (3) (4)

(1) (Reply)

How Can I Run The Mysql Update by deco2come: 12:16am On Apr 21, 2011
I have a users table and lastlogin table. How can I update the last login table with the information from users table. I tried

UPDATE lastlogin SET time = NOW() WHERE ?

I don't know what to write after the WHERE clause since the lastlogin table has only two fields( lastlogin_id and lastlogintime).

The users table has nothing related to the lastlogin table.

If I tried this UPDATE lastlogin SET lastlogintime = NOW() WHERE(SELECT username FROM users WHERE username = $sessionuser);

That means it will keep udating the lastlogin table anytime a different user log in.

How can I keep the last login time of each user?

(1) (Reply)

Webmaster / Hosting Account For Sale / Download Best Movies Whenever

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.