add to your mySQL query: 

" order by id desc limit 1" 

This will order your data by your primary id (change 'id' to whatever you 
auto-increment) in the descending order and will limit the results to 1 
record. 

Cheers, 

Maxim Maletsky 

Founder, Chief Developer
PHPBeginner.com (Where PHP Begins) 

www.PHPBeginner.com
[EMAIL PROTECTED] 

 

 

Hawk writes: 

> Lets say I have a guestbook, and that I only want to show the last entry on
> my first page
> I cant figure out a good way to do it..
> haven't managed to find a mysql command that can do it either, but maybe
> there are? :) 
> 
>  
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php 
> 
 


Maxim Maletsky 

Founder, Chief Developer
PHPBeginner.com (Where PHP Begins) 

www.PHPBeginner.com
[EMAIL PROTECTED] 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to