Page 1 of 1
Display 3 items
Posted: Mon Feb 18, 2008 1:19 pm
by mademokid
I'm working on an announcements script, and I need a way where
Code: Select all
SELECT * FROM announce ORDER BY date DESC
only grabs the latest 3 announcements.
Any help appreciated!
Re: Display 3 items
Posted: Mon Feb 18, 2008 1:22 pm
by staar2
add in the end of query LIMIT 3
Re: Display 3 items
Posted: Mon Feb 18, 2008 1:23 pm
by mademokid
Thanks star, it works!
Re: Display 3 items
Posted: Mon Feb 18, 2008 1:25 pm
by Etamnanki
LIMIT 3? Well, you could give it a try... no?
SELECT * FROM announce ORDER BY date DESC
LIMIT 3;
I think. Well, that's what conventional wisdom would say, no? I'm not too confident in my scripting abilities, but doesn't hurt to give it a shot.
(Oops, too late...)