Can anyone help me out by either telling me how to get to the result i
need or by pointing me to some documentation about the following question:
A certain query to a database give me eg 100 results:
$query = "select id, name, addr1, addr2, city from mytable where id="
..$id;
$connection = mysql_connect(e tc etc)
....
Then:
<table>
while ($result = mysql_fetch_arr ay($connection) ){
<tr>
<td>echo $result['name]; </td>
<td>echo $result['addr1']; </td>
</tr>
}
</table>
This all works well, but will give me all eg 100 results in one webpage.
What i want however is max 10 results per page, and then a link in the
bottom of a page with "next" reloading that page but then displaying
result 11-20 etc etc.
Now i've been puzzling about that the last couple of days but i just can't
get that to work. Anyone any suggestions / links / idea?
tia.
Joe
need or by pointing me to some documentation about the following question:
A certain query to a database give me eg 100 results:
$query = "select id, name, addr1, addr2, city from mytable where id="
..$id;
$connection = mysql_connect(e tc etc)
....
Then:
<table>
while ($result = mysql_fetch_arr ay($connection) ){
<tr>
<td>echo $result['name]; </td>
<td>echo $result['addr1']; </td>
</tr>
}
</table>
This all works well, but will give me all eg 100 results in one webpage.
What i want however is max 10 results per page, and then a link in the
bottom of a page with "next" reloading that page but then displaying
result 11-20 etc etc.
Now i've been puzzling about that the last couple of days but i just can't
get that to work. Anyone any suggestions / links / idea?
tia.
Joe
Comment