Re: [PHP-DB] mysql, finding the last record

2003-09-28 Thread Director General: NEFACOMP
I forgot to add DESC for the ORDER BY clause: ... ORDER BY SortedColumn DESC LIMIT 1 Thanks Emery - Original Message - From: "Director General: NEFACOMP" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, Septembe

Re: [PHP-DB] mysql, finding the last record

2003-09-28 Thread Director General: NEFACOMP
For the last Auto-increment SELECT LAST_INSERT_ID() FROM tblName; For the last row data: SELECT col1, col2, col3, col4 FROM tblName ORDER BY SortedColumn LIMIT 1 I don't know what you are looking for exactly. Explain and we will try to help though I am not an expert. Thanks Emer

Re: [PHP-DB] Re: If in a query

2003-09-28 Thread Director General: NEFACOMP
I think you are not considering all the cases. Suppose your column is NULL for the first record but it has a non-NULL value on the second record. So, why do you want your query to return nothing whereas there are values in it? Col1Col2Col3 __

Re: [PHP-DB] Queries probably timing out

2003-08-20 Thread Director General: NEFACOMP
I upgraded my server to RedHat 9 and the problem was solved. Thanks Emery - Original Message - From: "Micah Stevens" <[EMAIL PROTECTED]> To: "PHP-DB List" <[EMAIL PROTECTED]> Sent: Tuesday, August 19, 2003 22:32 Subject: Re: [PHP-DB] Queries probably timing out > IF it's a linux server a