PDA

View Full Version : pages with mysql


Phip
12-01-2002, 09:44 AM
i'm looking to do pages with stuff out of mysql. lets just say i have a long list of names in the database and i want to display 10 at a time and have "<<Prev 1 | 2 | 3 next>>" display for each page. like this:


name1
name2
name 3
name4
name5
name6
name7
name8
name9
name10
<<Prev 1 | 2 | 3 next>>





i've tried doing something like this before but it's never worked right.

any help or direction would be helpful.

raptori
12-01-2002, 08:25 PM
here is a start for you, try to figure out the rest....its simple


//a loop here
$start += 10;
$end = $start + 10;
//mysql query here
$query = "SELECT [field] FROM [table] LIMIT '$start','$end'";

Phip
12-02-2002, 01:18 AM
thanks for the tip i'll give it a try tonight.