Re: Only showing 20 lines per page...
- From: "Mike" <mike@xxxxxxxxxxxxxxxxxxxxx>
- Date: 16 Jul 2006 11:27:52 -0700
OK, think I have got it...
I can do the count using select count(id) and the maths to work out the
start and finish.
This is how I think using mysql_fetch_array works...
$conn = //db connection stuff
$sql = "select VALUES from TABLE LIMIT X,X";
$sql1 = "mysql_query($sql,$conn) or die(mysql_error());
while ($results = mysql_fetch_array($sql1)) {
$value1 = $results['value1'];
$value2 = $results['value2'];
.
.
.etc..
//create a display block
echo $value1
echo $value2
.
.
.etc..
}
I think I was confused as I'm used to seeing a counter var incremented
as the check to see when to dump out of the while loop. I couldn't see
how it knew to move to the next row each time. Can you explain?
Thanks
Mike
.
- Follow-Ups:
- Re: Only showing 20 lines per page...
- From: Rik
- Re: Only showing 20 lines per page...
- References:
- Only showing 20 lines per page...
- From: Mike
- Re: Only showing 20 lines per page...
- From: Rik
- Re: Only showing 20 lines per page...
- From: Mike
- Only showing 20 lines per page...
- Prev by Date: Re: Only showing 20 lines per page...
- Next by Date: Re: Only showing 20 lines per page...
- Previous by thread: Re: Only showing 20 lines per page...
- Next by thread: Re: Only showing 20 lines per page...
- Index(es):
Relevant Pages
|