var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: NOT BETWEEN with UNIXTIME field?
HI, I have a table where user logins are registered
Table is called g2_UserinfoMap and it looks like this:
g_id | g_userId | g_userName | g_ipAddress | g_timeStamp | g_action
Records in table are added after each user login to the site:
I'm trying to make a a select query to show users that were not logged in the last 3 months to the site so I could delete them from site management interface.
10 | 100 | user2 | 18.104.22.168 | 1256330245 | Login
10 | 100 | user1 | 22.214.171.124 | 1256330309 | Login
10 | 100 | user2 | 126.96.36.199 | 1256330317 | Login
10 | 100 | user2 | 188.8.131.52 | 1256331833 | Login
10 | 100 | mano3 | 184.108.40.206 | 1256331859 | Login
10 | 100 | user99 | 220.127.116.11 | 1256331864 | Login
I tried this SQL:
This gives me users that are not admin, but it lists all users.
WHERE g_timeStamp <= UNIX_TIMESTAMP( '2010-02-01 00:00:00' ) && g_userName != 'admin' && g_action = 'Login'
I think I need something like NOT BETWEEN but how to do it with Unixtime (g_timeStamp) field is in unixtime.
I tried to make like this but get an error obviously:
SELECT DISTINCT *
WHERE g_timeStamp NOT BETWEEN UNIX_TIMESTAMP( '2010-02-01 00:00:00' && '2010-01-01 00:00:00')
I'd rather be riding on the Tiger 800 or the Norton