Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2015
    Posts
    2

    Smile Unanswered: Selecting date from Multiple tables

    Click image for larger version. 

Name:	Data from multiple tables.png 
Views:	3 
Size:	190.8 KB 
ID:	16683
    Hello Techies,
    A have two tables (Table A and Table B) as seen in the attached picture. I wd like to select port_number from each table and display the in two separate columns on a form. I have tried but the code gives me a run time error. Am looking for assistance. Thanks in advance

    Ronald

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so what have you tried
    what error message(s) did you get
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Dec 2015
    Posts
    2

    selecting tata from multiple tables

    This is what i tried "$sql="SELECT tableA.port_number, tableB.port_number FROM tableA INNER JOIN tableB ON tableA.comments = tableB.comments"

  4. #4
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    again, what error messages did you get?
    Dave

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    ....and the error message is?
    ..examine the mysql object when you try to run the query and see what error number and message (if any) you have. If there are no errors then the error number will be 0.

    ...however in the absence of the table definitiobs my bet is that the error message will be to do with the join. Either there is no column comments in either table or your version of MySQL cannot perform a join because of the datatype in one or both tables of the column comments
    I'd rather be riding on the Tiger 800 or the Norton

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •