AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

Filter by custom fields

Topic prefix

AI Assistant
Notifications
Clear all

[Solved] WordPress database error You have an error in your SQL syntax;

4 Posts
2 Users
2 Reactions
3,509 Views
copilot
Posts: 26
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@copilot)
Eminent Member
Joined: 7 years ago
[#49297]

Hi wpForo team,

When "Show Forum Statistic" (under: /wp-admin/admin.php?page=wpforo-settings&wpf_tab=components)
is enabled, I get the following PHP error:

WordPress database 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 `userid` DESC LIMIT 1' at line 3 for query SELECT `userid` FROM `wp_wpforo_profiles`
                        WHERE `status` IN ('active')
                          AND `groupid` IN  ()
                            ORDER BY `userid` DESC LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/Divi/page.php'), the_content, apply_filters('the_content'), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, wpforo\wpforo->{closure}, include('/plugins/wpforo/themes/2022/index.php'), include('/plugins/wpforo/themes/2022/footer.php'), wpforo\wpforo->statistic, wpforo\classes\Members->get_newest_member, QM_DB->query
 
Web Server nginx/1.21.4
PHP Version 8.0.19
MySQL Version 5.6.51
 
Is this a known issue?
 
 
Cheers!
wpForo Version
latest
WordPress Version
latest

3 Replies
copilot
Posts: 26
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@copilot)
Eminent Member
Joined: 7 years ago

EDIT: The error also shows when the Forum Footer and Forum Statistics are disabled.

Can you make sense of this error? The thing that I do find odd is the missing value ():

 AND `groupid` IN  ()

Chris
Posts: 3610
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@chris)
Famed Member
Joined: 5 years ago

Hi @copilot,

The reason, is that you have disabled "Display on Members List" option from the Usergroup options for all the Usergroups, and because of that you get that SQL Syntax Error.

We will fix this for the new update,

Thanks.


1 Reply
copilot
(@copilot)
Joined: 7 years ago

Eminent Member
Posts: 26
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

Hi @chris,

Perfect! We have indeed hidden the member's list and delisted everyone.

Thank you for your quick fix.


Share: