5 results per page with 2 mysql tables

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mis2o
Forum Newbie
Posts: 10
Joined: Sat Dec 13, 2003 2:04 pm

5 results per page with 2 mysql tables

Post by mis2o »

hi, i don't know how to solve this:
i need to create a code that will show 5 results from mysql database per page. i know how to make it when with single mysql table - i used mysql LIMIT in query.

but how i've got 2 tables. i think i have to call 2 queries, one for table1, second for table2. then join the 2 results* and then solve the 5 results per page part. but i don't know how.

is there any function in php that will allow me to point to certain row through index?
(i mean something similar to mysql_fetch_row where you can point to certain column in a row though index)

*i don't know how this is possible, can i simply write "$result = ($result1 + $result2);"?
User avatar
DuFF
Forum Contributor
Posts: 495
Joined: Tue Jun 24, 2003 7:49 pm
Location: USA

Post by DuFF »

Post Reply