RE: [PHP] mysql query for current id-1

2001-10-01 Thread Jason Dulberg
g'; [EMAIL PROTECTED] > Subject: RE: [PHP] mysql query for current id-1 > > > > ... DESC LIMIT 1,1 > > As you wrote yourself. > > Sorry, haven't taken in consideration ;-) > > > Maxim Maletsky > www.PHPBeginner.com > > > > -Original Messag

RE: [PHP] mysql query for current id-1

2001-10-01 Thread Maxim Maletsky \(PHPBeginner.com\)
ECTED] Subject: RE: [PHP] mysql query for current id-1 Thank you for your lightning fast response!! I tried your query but it appears to be coming up with the current id rather than the users last login. __ Jason Dulberg Extreme MTB http://extreme.nas.net > -Original

RE: [PHP] mysql query for current id-1

2001-10-01 Thread Jason Dulberg
er.com) > [mailto:[EMAIL PROTECTED]] > Sent: October 2, 2001 12:14 AM > To: 'Jason Dulberg'; [EMAIL PROTECTED] > Subject: RE: [PHP] mysql query for current id-1 > > > > > What about this: > > $sql="select id,agent,host, DATE_FORMAT(time_in, '%

Re: [PHP] mysql query for current id-1

2001-10-01 Thread Mukul Sabharwal
Hi, The reason probably is that you're limiting from the 2nd row, instead of the first, 0 is the row starting point (I think). So : $sql="select id,agent,host, DATE_FORMAT(time_in, '%M %d, %Y, %l:%i') AS unixdate from logged_in WHERE userid='$current_user' ORDER BY id DESC LIMIT 0, 1"; = *

RE: [PHP] mysql query for current id-1

2001-10-01 Thread Maxim Maletsky \(PHPBeginner.com\)
ginal Message- From: Jason Dulberg [mailto:[EMAIL PROTECTED]] Sent: martedì 2 ottobre 2001 6.04 To: [EMAIL PROTECTED] Subject: [PHP] mysql query for current id-1 This is kindof a weird question so bear with me as I try to explain. I have a session table that gets updated when a user logs in/out. I

[PHP] mysql query for current id-1

2001-10-01 Thread Jason Dulberg
This is kindof a weird question so bear with me as I try to explain. I have a session table that gets updated when a user logs in/out. If they don't logout, some info is left unchanged. I have a cron script that takes care of the stray sessions so that's all good. In the sessions table, there's a