i want when i make a select on a db to get only the first 5 on loop over them
(and not needingto make a counter from 1 to 5)
thanks
peleg
how do i make a select on only the 5 first results
Moderator: General Moderators
-
Paddy
- Forum Contributor
- Posts: 244
- Joined: Wed Jun 11, 2003 8:16 pm
- Location: Hobart, Tas, Aussie
- Contact:
Use limit. For example,
Should work for your what you want.
Code: Select all
SELECT * FROM `table1` LIMIT 0 , 5