Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
ol4pr0
Forum Regular
Posts: 926 Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador
Post
by ol4pr0 » Wed Mar 03, 2004 2:00 pm
Lets say i have a database with about 100 differant items.
How would i go about on doing this..
Code: Select all
//db connecting and all that
$result = mysql_query("SELECT first 10 items FROM items");
// some table..
echo "0>10 items";
$result = mysql_query("SELECT 10>20 items FROM items");
// second table
"10>20 items";
// 3th
ect.....
Does this make any sence?
andre_c
Forum Contributor
Posts: 412 Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah
Post
by andre_c » Wed Mar 03, 2004 2:10 pm
I think this is what you mean
Code: Select all
SELECT * FROM table LIMIT 1, 10 //start on first row, get ten rows
SELECT * FROM table LIMIT 11, 10 //start on eleventh row, get ten rows
ol4pr0
Forum Regular
Posts: 926 Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador
Post
by ol4pr0 » Wed Mar 03, 2004 2:24 pm
Let me give that a try