Andy Ford wrote:
I thought LIMIT limited you to N number of CONCURRENT record. ie. limit
10 or limit 20
I believe Ross would like to select select 1000 records and then do a
sub select of records 1-20 and then 21-40 on this record set
LIMIT also allows you to specify a starting record, i.e. LIM
It seems to me you want to retrive n records based on the page number the user is in.
Here is what i use to page $limit records at a time using PHP:
$sql_select = "SELECT * FROM myTableName limit $offset , $limit";
$result = mysql_query($sql_select) or die ("Queryproblem: " . mysql_error());
02 April 2004 13:48
> To: [EMAIL PROTECTED]
> Subject: How do I determine the row number or key when table has no key
> fields
>
> eg. say a table is created using:
>
> create table fred (f1 char(10), f2 int)
>
> Then it has neither keys nor an AUTO_INCREMENT field.
lumn, then reload the data.
Find more information in the manual at
http://www.mysql.com/doc/en/index.html
Andy
-Original Message-
From: Ross Honniball [mailto:[EMAIL PROTECTED]
Sent: 02 April 2004 13:48
To: [EMAIL PROTECTED]
Subject: How do I determine the row number or key when table
Take a look at LIMIT in the Manual
Cheers
Terry
--Original Message-
> eg. say a table is created using:
>
> create table fred (f1 char(10), f2 int)
>
> Then it has neither keys nor an AUTO_INCREMENT field.
>
> Let's say 1000,000 records are then inserted into table fred
eg. say a table is created using:
create table fred (f1 char(10), f2 int)
Then it has neither keys nor an AUTO_INCREMENT field.
Let's say 1000,000 records are then inserted into table fred.
I then say 'select * from fred' and loop through results writing to a web page.
I stop writing to th