Results 1 to 6 of 6

Thread: Error line

  1. #1
    Join Date
    Jan 2006
    Posts
    24

    Unanswered: Error line

    when i get following error

    Code:
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 9

    where will i see ?

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    show query, please
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jan 2006
    Posts
    24
    HTML Code:
    Invalid SQL:
    
            SELECT post.postid, post.title, post.pagetext, post.dateline, post.userid, post.visible AS postvisible,
                IF(user.username, user.username, post.username) AS username,
                thread.threadid, thread.title AS threadtitle, thread.postuserid, thread.visible AS threadvisible,
                forum.forumid, forum.password
            FROM post AS post
            LEFT JOIN user AS user ON (post.userid = user.userid)
            INNER JOIN thread AS thread ON (post.threadid = thread.threadid)
            INNER JOIN forum AS forum ON (thread.forumid = forum.forumid)
            WHERE post.postid IN ();
    
    MySQL Error  : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 9
    Error Number : 1064
    Date         :
    Script       : http://www.mysite.com/newreply.php?do=newreply&noquote=1&p=756
    Referrer     : http://www.mysite.com/showthread.php?p=756
    IP Address   : 
    Username     : Admin
    Classname    : vb_database

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    remove that WHERE clause!
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Jan 2006
    Posts
    24
    Quote Originally Posted by r937
    remove that WHERE clause!

    form where ? from db or what ? i don not know ?

    (this error occurs while i am posting new reply in vBulletin forums )

  6. #6
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    the WHERE clause is invalid like that -- remove it from the query
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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