Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2011
    Posts
    1

    Post Unanswered: how to select one column from 3 tables

    hello,
    i want to select one same column from 3 tables and get a rows from this one column

    let's bring the code

    mysql_query("SELECT * from tv,movies WHERE hash='123'");

    so now i want the column called hash from the tv and movies to bring result from the hash number

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    if you have WHERE hash='123' then why do you want to return the hash column? you already know what value it's gonna have
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Additionally: you are missing a join condition between tv and movies.

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
  •