Re: LIMIT?
| From: | John Nichel | Date: | Mon, 06 Feb 2006 19:22:20 +0000 |
| Subject: | Re: LIMIT? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-229984@lists.php.net to get a copy of this message | ||
James Kaufman wrote:
On Mon, Feb 06, 2006 at 05:08:59PM +0200, Andrei wrote:Considering that the OP mentioned using the LIMIT command in his original post, it's probably safe to say that his db supports it. At least follow the thread. -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 jnichel@dotcomholdingsofbuffalo.comYou can use SELECT fields FROM table WHERE condition LIMIT 15, -1 and it will select all from 15... Andy William Stokes wrote:Answers that show SQL commands that apply to specific databases annoy me. Not everyone uses MySQL. I've worked with several databases that don't support a LIMIT command. At least mention the database engine you are referencing.Hello I have a news page which is getting quite long now and I would like to split the news to two pages. Now I have one SQL query for all the rows and I think I could use LIMIT to limit the results but how to limit the results for example to 15 rows for page one and from 16 to the last on second page? Number of rows increase daily. One page one there's headline and short summary and the second page should be "archive" with only the headline so all remaining rows can be printed to one page. Something like: "SELECT * FROMx_newsLIMIT 0 , 15" but how to do the archive page SELECT * FROMx_newsLIMIT 16 , xx? Thanks -Will