News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Database error

Started by xJamie, June 25, 2014, 09:53:45 PM

Previous topic - Next topic

xJamie

Whenever I go to my forum: http://pwnxile.cm/index.php?action=forum

I get this error:
QuoteDatabase 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 b.board_order' at line 21
File: C:\inetpub\wwwroot\Sources\Subs-BoardIndex.php
Line: 72

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.8, while your database is at version 2.0.7. The above error might possibly go away if you execute the latest version of upgrade.php.

I just upgraded from SMF 2.0.7 to 2.0.8. Unfortunately for me, I did not take any backups of my database before the upgrade :S

All replies appreciated, thanks.

xJamie

Here is my Subs-BoardIndex.php file, please see attachments.

Kindred

Did you have either portamx or arantor's board order fix mod?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

xJamie

Quote from: Kindred on June 25, 2014, 10:07:18 PM
Did you have either portamx or arantor's board order fix mod?

Here is a list of my mods:

  • Activity in Profile
  • CloudFlare
  • Add IP2Location to Track IP
  • MCLegendII RC3
  • Member Color Link
  • MySQL Board Order Fix
  • Ohara YouTube Embed
  • Referrals System
  • Simple Audio Video Embedder
  • SimplePortal
  • SolveMedia for SMF
  • SMFPacks Alerts Pro
  • SMF 2.0.8 Update
  • Users mass actions
  • WYSIWYG Quick Reply


Kindred

Yup... Uninstall 2.0.8
Then uninstall MySQL board order fix
Then reinstall 2.0.8

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

xJamie

Quote from: Kindred on June 25, 2014, 10:20:58 PM
Yup... Uninstall 2.0.8
Then uninstall MySQL board order fix
Then reinstall 2.0.8

That solved the problem, thanks a lot!

KTN

I have same message but my mod are different. Please help me out which one is causing an error?
Following are my mod.

1.    SMF 2.0.8 Update    1.0    [ Uninstall ]
2.    SMF 2.0.7 Update    1.0    [ Uninstall ]
3.    Simple Audio Video Embedder    2.3    [ Uninstall ]
4.    Sorted Package Manager Listing    1.2    [ Uninstall ]
5.    Drafts (for SMF 2.0 / SMF 1.1)    2.0.1    [ Uninstall ]
6.    Voter Visibility    2.0    [ Uninstall ]
7.    SMF 1.1.19 / 2.0.6 Update    1.0    [ Uninstall ]
8.    Member NotePad    2.0.3    [ Uninstall ]
9.    SMF 2.0.5 Update    1.0    [ Uninstall ]
10.    Simple Image Upload    1.4.0    [ Uninstall ]
11.    dQuoteSelection    2.5 b2    [ Uninstall ]
12.    Quick Spoiler    0.9.4    [ Uninstall ]
13.    SMF 2.0.4 Update    1.0    [ Uninstall ]
14.    PDF Tag    1.2    [ Uninstall ]
15.    SimpleColorizer    1.1    [ Uninstall ]
16.    AjaxChat Integration    3.2.1 (modified for SMF 2 RC3)    [ Uninstall ]
17.    Remove Hot Topic Icon    1.1.1    [ Uninstall ]
18.    New Some/New None    1.3    [ Uninstall ]
19.    Memberlist Additional Alphabet    2.0    [ Uninstall ]
20.    Remove "Last edit" mod    0.2.5    [ Uninstall ]
21.    SMF 2.0.3 Update    1.0    [ Uninstall ]
22.    Alternate User Posting    1.0.1    [ Uninstall ]
23.    Add Join Date to Post    1.0    [ Uninstall ]
24.    Thank-o-matic    3.0    [ Uninstall ]
25.    SMFPacks Shoutbox    1.0.4    [ Uninstall ]

Kindred

You can not have the same error... There are only two mods that I know of which cause that error... The MySQL board order and the portamx mods
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

KTN


Kindred

in which case, your other statement is incorrect, and you have modifications which are not displayed on your list...

Basically, the only way you get that error is if you had the board order fix in place before applying the 2.0.8 patch (which has the same fix in it - and the duplicate code casues the error)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

KTN

I got it.

In Subs-BoardIndex.php,

Code (Find) Select
$request = $smcFunc['db_query']('boardindex_fetch_boards',

Code (Replace With) Select
$request = $smcFunc['db_query']('',

Now my site is up and running with 2.0.8.

SauloA

Quote from: KTN on June 28, 2014, 12:32:20 AM
I got it.

In Subs-BoardIndex.php,

Code (Find) Select
$request = $smcFunc['db_query']('boardindex_fetch_boards',

Code (Replace With) Select
$request = $smcFunc['db_query']('',

Now my site is up and running with 2.0.8.

This solution worked great for me.  Thank You!

Arantor

I hope your boards retain their order (as opposed to finding the real problem)

Kindred

In other words, that was the WRONG solution...   it may have solved the immediate issue, but at the code of a bunch of other potential issues that might not be immediately obvious
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

keul

#14
The error is also caused by the mod "Single Category" ( Single_Category_v2.1.8/SingleCategory-20x.xml )

There's the lastest version  here : http://custom.simplemachines.org/mods/?mod=486

Detail of the error:
End of the query was (in error log section of admin pannel):
"ORDER BY board_order ASC ORDER BY b.board_order"

To solve this manually (if you can't update the mod), replace in Subs-BoardIndex.php,

AND c.id_cat{raw:cat_field}
ORDER BY board_order ASC" : ""), array(

with

AND c.id_cat{raw:cat_field}
" : ""), array(

Arantor

That's because the mod isn't compatible with changes in SMF 2.0.8.

Kindred

which should really be discussed in the mod support topic - not a support topic regarding an issue that has been marked as solved. :P
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: