Skip to main content
Known Participant
October 2, 2006
Question

MySQL - Join Tables

  • October 2, 2006
  • 1 reply
  • 238 views
Hi,
I'm using MySQL as the Database.
I did a 'Master Detail Page' and now I'm on the details page.
I use forms and textboxes to display the dynamic text in the text fields.
Others was a success as it doesn't needs joining of tables.
How i did others was by:
Set the properties of the textbox. 'Init val' -> Bind to dynamic source.
after selecting the dynamic source, the code i saw in the properties 'init val' was <?php echo $row_rsCandidateDetails['HighestQualif']; ?>
All these were success.

But when i had a field that needed joining of tables, the data from the database didnt appear in the text box.
How can I write the SQL code for MySQL to do this joining of tables?

What I've tried:

SELECT *
FROM table1 LEFT JOIN table2 ON table1.Xid = table2.Xid
WHERE table2.aID = 'id'

id is a name of variable created, default value -1, run-time value $_GET['recordID']

SELECT * FROM table1 INNER JOIN table2 ON table1.Xid=table2.Xid where table2.aID = 'id'




Can someone tel me the sql code to type in for MySQL ?
Thanks.

This topic has been closed for replies.

1 reply

J-GirlAuthor
Known Participant
October 4, 2006
Can someone kindly help me on this Joining of tables thing? to get data by joining tables.
[Please read the above post.]