Re: [PHP] Retrieve The Last Record in a Table

2004-07-27 Thread Curt Zirzow
* Thus wrote Harlequin: > I would like to retrieve the last entry in a login table and present that to > a user so they can verify the date we have when they last logged in. retrieving the last record is a lot of overhead, instead add a 'last logged in' field to the user table. retrieve the field

Re: [PHP] Retrieve The Last Record in a Table

2004-07-27 Thread JOHN MEYER
Or you could retrieve that information prior to inserting the login information, say, as soon as they type in their login name, store that, then present it. From: Jason Davidson <[EMAIL PROTECTED]> To: Harlequin <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Subject: Re: [PHP] Retri

Re: [PHP] Retrieve The Last Record in a Table

2004-07-27 Thread Jason Davidson
You could LIMIT 2, using the order on a column, the first record would be last, the second would be second last. Kinda dirty way to do it, however, off hand, cant think of an alternative, ill post it if i do think of one though. Jason On Tue, 27 Jul 2004 09:59:21 +0100, Harlequin <[EMAIL PROTECT

Re: [PHP] Retrieve The Last Record in a Table

2004-07-27 Thread Harlequin
Thanks for that Jason Any suggestions on how I would retrieve the next to last entry...? The last time prior to this session that the user logged in...? -- - Michael Mason Arras People www.arraspeople.co.uk - "Jason Davidson" <[EMAIL PRO

Re: [PHP] Retrieve The Last Record in a Table

2004-07-26 Thread Jason Davidson
as mentioned already, use a column in the table to order the query and then use LIMIT to only to return one record. Best columns to use would be an auto_increment or a datetime field type. Jason On Mon, 26 Jul 2004 18:27:25 +0100, Harlequin <[EMAIL PROTECTED]> wrote: > > > I would like to retr

Re: [PHP] Retrieve The Last Record in a Table

2004-07-26 Thread bbonkosk
I'm sure there are many ways to do this. Perhaps use something like this as a query? select * from login_table order by DATE_LAST_LOGGED_IN ASC limit 1 - Original Message - From: Harlequin <[EMAIL PROTECTED]> Date: Monday, July 26, 2004 1:27 pm Subject: [PHP] Retrieve The

RE: [PHP] Retrieve The Last Record in a Table

2004-07-26 Thread Jay Blanchard
[snip] I would like to retrieve the last entry in a login table and present that to a user so they can verify the date we have when they last logged in. Is this possible...? [/snip] yes, http://catb.org/~esr/faqs/smart-questions.html -- PHP General Mailing List (http://www.php.net/) To unsubscri

[PHP] Retrieve The Last Record in a Table

2004-07-26 Thread Harlequin
I would like to retrieve the last entry in a login table and present that to a user so they can verify the date we have when they last logged in. Is this possible...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP Gen