Re: [PHP] DESC order results

2008-01-14 Thread Richard Lynch
On Sun, January 13, 2008 12:54 pm, Danny Brow wrote: Just wondering if anyone could tell me how reliable the DESC order option is going to be when I am parsing thousands of records where they are multiple ChartNo's for the same clientNo. Or is there a better way to grab the most recent

Re: [PHP] DESC order results

2008-01-14 Thread Jochem Maas
Richard Lynch schreef: On Sun, January 13, 2008 12:54 pm, Danny Brow wrote: Just wondering if anyone could tell me how reliable the DESC order option is going to be when I am parsing thousands of records where they are multiple ChartNo's for the same clientNo. Or is there a better way to grab

[PHP] DESC order results

2008-01-13 Thread Danny Brow
Just wondering if anyone could tell me how reliable the DESC order option is going to be when I am parsing thousands of records where they are multiple ChartNo's for the same clientNo. Or is there a better way to grab the most recent ChartNo. $link = mysql_connect('localhost', 'myuser',

Re: [PHP] DESC order results

2008-01-13 Thread Jochem Maas
Danny Brow schreef: Just wondering if anyone could tell me how reliable the DESC order option is going to be when I am parsing thousands of records where they are multiple ChartNo's for the same clientNo. Or is there a better way to grab the most recent ChartNo. this is a mysql question not a

Re: [PHP] DESC order results

2008-01-13 Thread Danny Brow
Thanks for the answer, didn't think of asking this in a MySQL forum, sorry. Dan On Sun, 2008-01-13 at 20:28 +0100, Jochem Maas wrote: Danny Brow schreef: Just wondering if anyone could tell me how reliable the DESC order option is going to be when I am parsing thousands of records where

Re: [PHP] DESC order results

2008-01-13 Thread Larry Garfield
This is a MySQL question, not a PHP question. That said, what you want is the LIMIT keyword. On Sunday 13 January 2008, Danny Brow wrote: Just wondering if anyone could tell me how reliable the DESC order option is going to be when I am parsing thousands of records where they are multiple

Re: [PHP] DESC order results

2008-01-13 Thread Silvio Porcellana
$query = 'SELECT * FROM eChart WHERE clientNo = 2 ORDER BY ChartNo DESC'; If you want just one record: $query = 'SELECT * FROM eChart WHERE clientNo = 2 ORDER BY ChartNo DESC LIMIT 0, 1'; BTW, you'd better ask the MySQL mlist: http://lists.mysql.com/ HTH, cheers Silvio -- PHP General