hey all. i have two tables that holds:
table1= A, B, C and a_id
table2= X, Y, Z and b_id
I want to select and align the record rows from table1 and table2 wherever a_id = b_id.
So i get to display:
A B C X Y Z wherever a_id in table1 is = b_id in table2
How do i write my SQL statement, and how do i retrieve the values!?! Thanks a mill guys (and girls).
mysql table select php etc... (thanks).
Moderator: General Moderators
time to read a basic sql tutorial|book|whatever?
or if you read a little more:
Code: Select all
SELECT A, B, C, X, Y, Z
FROM table1, table2
WHERE table1.a_id=table2.b_idCode: Select all
SELECT A, B, C, X, Y, Z
FROM table1
INNER JOIN table2 USING a_id=b_id