Page 1 of 1

5 results per page with 2 mysql tables

Posted: Sat Feb 14, 2004 7:28 am
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);"?

Posted: Sat Feb 14, 2004 9:37 am
by DuFF