Results 1 to 3 of 3
  1. #1
    Join Date
    May 2011
    Posts
    4

    Unanswered: Quick MySQL Question :)

    Hey guys,

    I'm getting this error :

    Operand should contain 1 column(s)

    From this Query :

    SELECT(RequestID, ModCode, Request.RoomID, Priority, AllWeek, Day, StartTime, Length)
    FROM Request, Rooms
    WHERE Day = '1'
    AND ModCode = '1'
    AND StartTime = '1'
    AND Length = '1'

    That MySQL is generated by PHP and then being sent if that makes any difference.

    Thanks for your help

    Alex

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by lecsiy View Post
    That MySQL is generated by PHP ...
    then you need to fix the code that produces the query, because those parentheses around the columns in the SELECT clause is wrong, wrong, wrong

    you're also going to have fun with your join condition missing
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    only text / string literals shold be qualified by the ', not numeric values.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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