Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

MySQL - Join Tables

New Here ,
Oct 02, 2006 Oct 02, 2006

Copy link to clipboard

Copied

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.

TOPICS
Server side applications

Views

218
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 04, 2006 Oct 04, 2006

Copy link to clipboard

Copied

LATEST
Can someone kindly help me on this Joining of tables thing? to get data by joining tables.
[Please read the above post.]

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines