Re: [PHP-DB] last record

2005-01-27 Thread just roibm
When the result page is presented I want to provide a link to the last record at the top of the page. well, what about one of these: - add that link via javascript - use some sort of a buffer valiable for the output and add the link at the beginning of the buffer from within php -- PHP

Re: [PHP-DB] last record

2005-01-25 Thread Martin Norland
neil wrote: Thanks Peter The reason I was wanting to do it in php was because the sql query is quite complex and variable depending on the input from a form. When the result page is presented I want to provide a link to the last record at the top of the page. After connecting and selecting the

[PHP-DB] last record

2005-01-24 Thread neil
Apart from the obvious of reversing the sort order in a select statement and then picking off the first record eg. select * from blah where somefield like '%something%' order by someotherfield desc limit 0,1 is there any way in php rather than sql to pick the last record in a record set? Thanks

Re: [PHP-DB] last record

2005-01-24 Thread John Holmes
neil wrote: Apart from the obvious of reversing the sort order in a select statement and then picking off the first record eg. select * from blah where somefield like '%something%' order by someotherfield desc limit 0,1 is there any way in php rather than sql to pick the last record in a record

Re: [PHP-DB] last record

2005-01-24 Thread neil
Thanks Peter The reason I was wanting to do it in php was because the sql query is quite complex and variable depending on the input from a form. When the result page is presented I want to provide a link to the last record at the top of the page. After connecting and selecting the table I am

RE: [PHP-DB] last record

2005-01-24 Thread Peter Lovatt
hi using mysql as you describe is probably the most elegant and efficient way to do it is there a reason for asking php to do it? Peter -Original Message- From: neil [mailto:[EMAIL PROTECTED] Sent: 25 January 2005 03:12 To: php-db@lists.php.net Subject: [PHP-DB] last record

[PHP-DB] Last Record

2002-12-09 Thread Jim
Is there a quick and easy way to find out the record id of the last record in a table? I need to read the last record and let the user know what the date of the last record added is. -- Jim Freedom is worth protecting -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP-DB] Last Record

2002-12-09 Thread John W. Holmes
Is there a quick and easy way to find out the record id of the last record in a table? I need to read the last record and let the user know what the date of the last record added is. SELECT date FROM table ORDER BY date DESC LIMIT 1 ---John W. Holmes... PHP Architect - A monthly magazine

[PHP-DB] Last record

2002-06-03 Thread Antonio Bernabei
If I have just inserted one set of values with mysql_query(INSERT ...) how can I get the values just inserted (I needed to get an autoincrement value out of the table) Thanks Antonio Bernabei - Original Message - From: César L. Aracena [EMAIL PROTECTED] To: PHP DB List [EMAIL PROTECTED]

Re: [PHP-DB] Last record

2002-06-03 Thread César L . Aracena
Bernabei [EMAIL PROTECTED] To: César L. Aracena [EMAIL PROTECTED]; PHP DB List [EMAIL PROTECTED] Sent: Monday, June 03, 2002 5:14 AM Subject: [PHP-DB] Last record If I have just inserted one set of values with mysql_query(INSERT ...) how can I get the values just inserted (I needed to get