Hi,
I would like to know how you would select from multiple tables:
tableA
colx, coly, cola, colb, colc
and
tableB
col1, col2, cola, colb, colc
the tables only differ from the first 2 columns of each of them (tables) but I would like to have it SELECT * FROM "both of them"
actually the reason for that is I wanted to lay all out in a while() loop, and at the same time paginate it.
while tableA consist of older records, time-wise, it will be the first to be "echo-ed", I had problems paginating it if I do not join the query into a single query as opposed to querying tableA, then echo, then query tableB then echo.
thanks!
Selecting Multiple Unsimilar Tables
Started by
MrLeche
, Jul 11 2011 9:46 PM
2 replies to this topic
#1
Posted 11 July 2011 - 9:46 PM
#2
Posted 11 July 2011 - 11:15 PM
SELECT * FROM tableA, tableB ....
A tips thought; User more descriptive names for your tables and columns.
#3
Posted 12 July 2011 - 11:50 AM
SELECT * FROM tableA, tableB ....
A tips thought; User more descriptive names for your tables and columns.
Sheez, that easy I was googling and resulted to JOINS, LEFT JOINS, ON AS... Thanks, I'll run a quickie.










