Announcement

Collapse
No announcement yet.

I've been given the following SQL Error

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

  • [Forum] I've been given the following SQL Error

    I've been given the following SQL Error and I would like to know how to fix it, Could anybody help me with this issue?

    Database error in vBulletin 4.1.11:

    Invalid SQL:

    SELECT t1.templateid AS templateid_1, t1.title ,
    t1.templateid AS templateid_1, t1.title AS title1, t1.styleid AS styleid_1 ,
    t2.templateid AS templateid_2, t2.title AS title2, t2.styleid AS styleid_2
    FROM template AS t1
    LEFT JOIN template AS t1 ON (t1.title=t1.title AND t1.styleid=-2-1)
    LEFT JOIN template AS t2 ON (t1.title=t2.title AND t2.styleid=17)
    WHERE t1.styleid IN (-1,0)
    ORDER BY t1.title;

    MySQL Error : Not unique table/alias: 't1'
    Error Number : 1066
    Request Date : Friday, April 13th 2012 @ 05:58:37 PM
    Error Date : Friday, April 13th 2012 @ 05:58:37 PM
    Script : http://www.website.com/forums/admincp/plugin.php?do=productimport
    Referrer : http://www.website.com/forums/admincp/plugin.php?do=productadd
    IP Address : ***********
    Username : Eric
    Classname : vB_Database
    MySQL Version : 5.1.61-log

    Thanks.

  • #2
    What product are you trying to import?
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment


    • #3
      That is and error from a modification. Try disabling your modifications/plugins and see if you still have this problem.Note: To temporarily disable the plugin system, edit includes/config.php and add this line right under <?php


      PHP Code:
      define('DISABLE_HOOKS'true); 

      Please don't PM or VM me for support - I only help out in the threads.
      vBulletin Manual & vBulletin 4.0 Code Documentation (API)
      Want help modifying your vbulletin forum? Head on over to vbulletin.org
      If I post CSS and you don't know where it goes, throw it into the additional.css template.

      W3Schools &lt;- awesome site for html/css help

      Comment


      • #4
        Originally posted by Lynne View Post
        That is and error from a modification. Try disabling your modifications/plugins and see if you still have this problem.Note: To temporarily disable the plugin system, edit includes/config.php and add this line right under <?php


        PHP Code:
        define('DISABLE_HOOKS'true); 
        Even after trying that I am still given the SQL error.

        Comment


        • #5
          Really - and you aren't using any modification files when you get that error? That is from the TMS modification, so I don't know how you can still get the error if you aren't using that modification.

          Please don't PM or VM me for support - I only help out in the threads.
          vBulletin Manual & vBulletin 4.0 Code Documentation (API)
          Want help modifying your vbulletin forum? Head on over to vbulletin.org
          If I post CSS and you don't know where it goes, throw it into the additional.css template.

          W3Schools &lt;- awesome site for html/css help

          Comment


          • #6
            Originally posted by Lynne View Post
            Really - and you aren't using any modification files when you get that error? That is from the TMS modification, so I don't know how you can still get the error if you aren't using that modification.
            So any advice as to fixing this error? Would it be advised to backup my database and reinstall vbulletin?

            Comment


            • #7
              I would uninstall that modification. Or at least remove all the files for it. Or, better yet, go to the thread and see what the fix is for it.

              Please don't PM or VM me for support - I only help out in the threads.
              vBulletin Manual & vBulletin 4.0 Code Documentation (API)
              Want help modifying your vbulletin forum? Head on over to vbulletin.org
              If I post CSS and you don't know where it goes, throw it into the additional.css template.

              W3Schools &lt;- awesome site for html/css help

              Comment


              • #8
                Originally posted by Lynne View Post
                I would uninstall that modification. Or at least remove all the files for it. Or, better yet, go to the thread and see what the fix is for it.
                It's not just for mods, if i try to add a new forum/category i still get the error:

                Database error in vBulletin 4.1.11:

                Invalid SQL:

                SELECT t1.templateid AS templateid_1, t1.title ,
                t1.templateid AS templateid_1, t1.title AS title1, t1.styleid AS styleid_1 ,
                t2.templateid AS templateid_2, t2.title AS title2, t2.styleid AS styleid_2
                FROM template AS t1
                LEFT JOIN template AS t1 ON (t1.title=t1.title AND t1.styleid=-2-1)
                LEFT JOIN template AS t2 ON (t1.title=t2.title AND t2.styleid=17)
                WHERE t1.styleid IN (-1,0)
                ORDER BY t1.title;

                MySQL Error : Not unique table/alias: 't1'
                Error Number : 1066
                Request Date : Saturday, April 14th 2012 @ 02:50:33 PM
                Error Date : Saturday, April 14th 2012 @ 02:50:33 PM
                Script : http://www.website.com/forums/admincp/forum.php?do=add
                Referrer : http://www.website.com/forums/adminc....php?do=modify
                IP Address : ***********
                Username : Eric
                Classname : vB_Database
                MySQL Version : 5.1.61-log

                Comment


                • #9
                  Disable all plugins and see if it continues. I found on my forum a auto tag plugin was causing a similar error.
                  www.cdmagurus.com
                  www.cellphone-gurus.com

                  Comment


                  • #10
                    Originally posted by whitey10tc View Post
                    Disable all plugins and see if it continues. I found on my forum a auto tag plugin was causing a similar error.
                    Tried that and used the code that Lynne provided and still not working :S

                    Comment


                    • #11
                      Originally posted by ericfahey View Post
                      Tried that and used the code that Lynne provided and still not working :S
                      What I had to was a headache, I had to go through and uninstall each plugin and all associated files and resinstall them one by one until I found the auto tagging fault.
                      Here's my old thread https://www.vbulletin.com/forum/show...Error-messages not much help just one post that lead me to do my own trouble shooting.
                      www.cdmagurus.com
                      www.cellphone-gurus.com

                      Comment


                      • #12
                        Originally posted by whitey10tc View Post
                        What I had to was a headache, I had to go through and uninstall each plugin and all associated files and resinstall them one by one until I found the auto tagging fault.
                        Here's my old thread https://www.vbulletin.com/forum/show...Error-messages not much help just one post that lead me to do my own trouble shooting.
                        Thanks for the help i'll try this and see what happens

                        Thanks again

                        Comment

                        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                        Working...
                        X