Results 1 to 3 of 3
Thread: since last visit...
Jul 18, 2005, 21:00 #1
since last visit...
I have 2 tables; 'admin' & 'subscribers'. The admin table has a field named 'lastlogin' setup as datetime. The subscribers table has a field named 'dateadded' setup as date time. Both have id pk fields.
All I'm trying to do is, when the admin logs in I want to show the number of new subscribers since last login.
Should be simple, but I can't get it to work without errors.
Jul 18, 2005, 23:17 #2
- Join Date
- Jul 2005
- Venlo, the Netherlands
- 0 Post(s)
- 0 Thread(s)
First of all, you shouldn’t separate admin and subscribers in two tables. Both are people. Being an admin or subscriber is just a small extra feature. The rest of the information should be quite alike.
But with two tables, a simple comparison may do:
FROM subscriber, admin
WHERE subscriber.dateadded > admin.lastlogin
Make sure that ‘dateadded’ and ‘lastlogin’ are DATE or DATETIME fields
Jul 19, 2005, 06:35 #3
Your suggestion was the solution. Thanks!