Announcement

Collapse
No announcement yet.

Please help me with - mysql error number: 1064

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Please help me with - mysql error number: 1064

    I was updating my post cache counters and I got this error.
    I don't know what it means. I changed the lenth of my smilie text
    replacement variable awhile back, could this be the cause?

    Code:
    Database error in vBulletin 3.0.3:
    
    Invalid SQL: 
        		    	SELECT smilietext, smiliepath, smilieid FROM smilie  ORDER BY LENGTH(smilietext) DESC  ORDER BY LENGTH(smilietext) DESC
    				
    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 'ORDER BY LENGTH(smilietext) DESC' at line 1
    
    mysql error number: 1064
    
    Date: Monday 09th of May 2005 09:39:44 AM
    Script: http://www.mysite.net/web/forum/admincp/misc.php
    Referer: http://www.mysite.net/web/forum/admincp/misc.php
    Username: JohnBee
    IP Address: *.*.*.*

  • #2
    You have two of these:

    ORDER BY LENGTH(smilietext) DESC ORDER BY LENGTH(smilietext) DESC

    Get rid of one.

    Comment


    • #3
      Where are they?

      Comment


      • #4
        This is what you were executing at the time:

        http://www.mysite.net/web/forum/admincp/misc.php

        It's gotta be in that script. You install any hacks?

        Comment


        • #5
          Here is the smilie section from that .php
          I don't see any duplicates though.

          Code:
          // ############################### start show smilies ###############################
          if ($_REQUEST['do'] == 'showsmilies')
          {
          
          	$smiliebits = '';
          
          	$smilies = $DB_site->query("
          		SELECT smilietext,smiliepath,smilie.title,imagecategory.title AS category
          		FROM " . TABLE_PREFIX . "smilie AS smilie
          		LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
          		ORDER BY imagecategory.displayorder, smilie.displayorder
          	");
          
          	while ($smilie = $DB_site->fetch_array($smilies))
          	{
          		if ($smilie['category'] != $lastcat)
          		{
              		eval('$smiliebits .= "' . fetch_template('help_smilies_category') . '";');
          		}
          		exec_switch_bg();
          		eval('$smiliebits .= "' . fetch_template('help_smilies_smilie') . '";');
          		$lastcat = $smilie['category'];
          	}
          
          	$navbits = construct_navbits(array(
          		"faq.php?$session[sessionurl]" => $vbphrase['faq'],
          		'' => $vbphrase['smilie_list']
          	));
          
          	eval('$navbar = "' . fetch_template('navbar') . '";');
          
          	eval('print_output("' . fetch_template('help_smilies') . '");');
          }
          
          // ############################### start show avatars ###############################

          Comment


          • #6
            I FOUND IT!
            It was in functions_bbcodeparse.php

            Part of a smilie fix hack, my own typo during installtion, thank you for pointing me
            in the right direction .thumbsup.

            Comment


            • #7
              You're welcome.

              Comment

              Loading...
              Working...
              X