|
Posted by no on 01/27/07 01:45
On 26 Jan 2007 17:10:17 -0800, "badmets@gmail.com" <badmets@gmail.com>
wrote:
>hi, i'm a newbie to php and sql and am trying to execute the following
>script: i want to call the latest entry to a field in a record set.
>its a letter, that asks for a signature, and i want to display, on a
>diffent page, the latest signature. here's the letter:
>http://badmets.com/buckner/
>
>struggling.....
OK, split the idea into 2 stages ...
* you want 1 record only, so you'll use a clause like "LIMIT 1" in
your SELECT
* you want the last record first - so select the ORDER BY and use DESC
So, like
SELECT * FROM signatures ORDER BY idsignatures DESC LIMIT 1
Hope that helps
Chris R.
Navigation:
[Reply to this message]
|