1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

1064 error in MySQL

Discussion in 'MySQL' started by smp, Aug 26, 2012.

  1. smp

    smp New Member

    Joined:
    Jul 8, 2012
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Code:
    Invalid SQL:
    
    			SELECT postid
    			FROM post AS post
    			INNER JOIN thread AS thread ON(thread.threadid = post.threadid)
    			WHERE post.userid = 2
    				AND thread.forumid IN(3,5,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,98,100,101,99,103,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,94,37,38,39,40,41,42,43,49,44,45,46,47,48,104,105,106,107,108,109,110,111,112,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,95,70,71,72,73,74,75,76,77,96,78,79,80,81,82,97,83,84,85,86,87,91,88,89,90,92,93)
    			ORDER BY post.dateline DESC
    			LIMIT 1.84467440737E+19;
    
    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 '1.84467440737E+19' at line 7
    Error Number  : 1064
    Request Date  : Saturday, August 25th 2012 @ 11:31:23 PM
    Error Date    : Saturday, August 25th 2012 @ 11:31:23 PM
    Classname     : vB_Database
    MySQL Version : 5.0.95-community-log
    I am getting this error in mysql. Can someone please help me find the mistake here.

    Thanks
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,292
    Likes Received:
    365
    Trophy Points:
    83
    What do you want to be doing with

    Code:
    LIMIT 1.84467440737E+19;
     
  3. smp

    smp New Member

    Joined:
    Jul 8, 2012
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    i believe thats the limit of the amount of result that we will get on running this code.
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,292
    Likes Received:
    365
    Trophy Points:
    83
    Thats a too bigger limit. Make it some number less than 100 and that should really help
     
    smp likes this.
  5. smp

    smp New Member

    Joined:
    Jul 8, 2012
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    thanks, it works.
     

Share This Page