SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Incorrect JOIN Syntax?

    Hello,

    In PHP, can you select data out of three tables using the below query:

    Code:
    SELECT FileName, FileDescription FROM IntraFiles, IntraDepartment, IntraDocumentType 
    WHERE IntraDepartment.IntraDepartmentID=IntraFiles.IntraDepartmentID AND
    IntraDocumentType.IntraDocumentTypeID=IntraFiles.IntraDocumentTypeID AND
    IntraFiles.IntraDeparmentID='3'
    I get unknown column: IntraFiles.IntraDepartmentID in my where clause. All columns do exist, I'm looking at them right now. I have used other queries and they work. The number 3 does exist as well I should get two records back, I get none.

    Any suggestions/tips are appreciated.
    Ryan Butler

    Midwest Web Design

  2. #2
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Doh! I'm an idiot, miss-spelled the column name above! Sorry for the wasted thread!
    Ryan Butler

    Midwest Web Design


Bookmarks

Posting Permissions

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