Page 1 of 1

[Solved] Displaying the top record Only?

Posted: Mon Feb 28, 2005 9:29 am
by shab620
Hye

I have a table which has a series of values within it. The table has an identifier which is numeric vaue and set to autoincrement when an order is added.

What i want to do is simply display the top (newest record) when i perfrom a query to retive the results

I've tried "MAX(Special_ID)" and this displays the top record but just the Special_ID column

Does anyone know how I might do this?

:)

Shab

Posted: Mon Feb 28, 2005 9:35 am
by feyd

Code: Select all

SELECT * FROM table ORDER BY `Special_ID` DESC LIMIT 1

Posted: Mon Feb 28, 2005 9:46 am
by shab620
Thanks for that Feyd

That is working now.

Shab
:D :D