The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Prev & Next Button
Hi
I am new to php and i`m enjoying learning it. I have just started on databases and come across a slight problem: I need to display records of 10 the have a next and prev button to display the remainder of the records. I have seached all over the net but the code i have come across is all Chinese to me - here is the code i have so far: <? $server= "myserver"; $user= "myaccount"; $password= "pass"; $database= "database1"; $table= "table1"; MYSQL_CONNECT($server, $user, $password) or die ( "<H3>Server unreachable</H3>"); MYSQL_SELECT_DB($database) or die ( "<H3>Database non existent</H3>"); $result=MYSQL_QUERY( "SELECT * FROM $table order by name "); if(mysql_num_rows($result)) { // it is true, so let's print the results to the browser while($row = mysql_fetch_row($result)) { print (" $row[0] "); ?><? print (" $row[1] "); ?><? print (" $row[2] "); ?> <? } } else { // false, no results } ?> thats the code i am using so could someone please help me where to place the code for displaying the next records etc... Thank you very much Lee The PHP Newbie ! |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|