SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2002
    Location
    Romania
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What's wrong with this?

    Code:
    mysql_query("select sum(rating) from ratings where voter != '$user' and pid = '$pid'")
    what is wrong with that query?

    it gives me:
    Unknown column 'voter' in 'where clause';


    another query before it works,which is similar:
    Code:
    mysql_query("select rating from ratings where voter = '$user' and pid = '$pid' limit 1");
    the voter column is there

    thanks

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    Posts
    4,095
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dear everyone,

    I'm not sure if MySQL supports the use of "!="...

    Compuwhiz7


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
  •