Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    42

    Unanswered: A simple query help.

    Hi,

    Im new to this MySQL. Im trying the following query on a table called music with 2 columns called artist and type.

    SELECT *
    FROM music
    WHERE artist = Metallica
    LIMIT 0 , 30

    MySQL said:

    #1054 - Unknown column 'Metallica' in 'where clause'

    Ive tried messing around with it but am pretty mush losing. Any help would be greatly appreciated.

    Cheers .

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    in the context of your query the way you wrote it, Metallica is a column, whereas 'Metallica' is a string value, which is what you want
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Mar 2004
    Posts
    42
    Yes thats it. Cheers, was a rather n00bish question.

    Thanks

    Jon

Posting Permissions

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