Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    search on two tables with mapping IDs

    i have two tables and i want to search in two tables and show info about the user.
    half user info records in 1st table and other half in 2nd table
    if i search any user name then all info about that user will display from BOTH TABLE
    the two table join with the same id

    please help me by sending php code
    thank you
    Last edited by ApniGang; 04-29-2009 at 11:51 AM.

  • #2
    Regular Coder
    Join Date
    Apr 2009
    Location
    somewhere over the rainbow
    Posts
    105
    Thanks
    2
    Thanked 14 Times in 14 Posts
    INNER JOIN.
    and add the WHERE in the end.

    notice that you have to specify the table name of which column you want
    tbl1.col1


  •  

    Posting Permissions

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