Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Featured topics and posts
Avatar
Younès
France
Member
Free Members
sp_UserOfflineSmall Offline
Oct 18, 2014 - 3:38 pm

error : Invalide database request

sp-head.pngImage Enlarger

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 18, 2014 - 4:36 pm

what is the relation of the error to the image which is code???

as to the code, did you use the raw code button or just copy the post??  the latter may mess up the quotes - cant tell from image... but that would not be a db error...

on forum - toolbox - error log, you can get more info on the db error...

do you have some featured topics listed in the forum - components - featured topics??

Avatar
RickyMcG
Member
Free Members
sp_UserOfflineSmall Offline
Feb 5, 2015 - 6:12 pm

I'm having a similar problem ... "Invalid Database Query" alert.

I've checked the code numerous times. Seems fine.

Here's the error log:

file: /problem-with-post-edit-buttonome/m0nst3r/public_html/wp-content/plugins/simple-press/forum/content/classes/sp-list-post-class.php

line: 154

function: select

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 ') AND ouj2wu4b1u_sfposts.forum_id IN (1,2,3,4,5,6) ORDER BY ouj2wu4b1u_sfposts.p' at line 3

SELECT ouj2wu4b1u_sfposts.post_id, post_content, post_date, ouj2wu4b1u_sfposts.topic_id, ouj2wu4b1u_sfposts.forum_id, ouj2wu4b1u_sfposts.user_id, guest_name, post_status, post_index, forum_name, forum_slug, forum_disabled, ouj2wu4b1u_sfforums.group_id, group_name, topic_name, topic_slug, ouj2wu4b1u_sftopics.post_count, topic_opened, display_name FROM ouj2wu4b1u_sfposts JOIN ouj2wu4b1u_sfforums ON ouj2wu4b1u_sfforums.forum_id = ouj2wu4b1u_sfposts.forum_id JOIN ouj2wu4b1u_sfgroups ON ouj2wu4b1u_sfgroups.group_id = ouj2wu4b1u_sfforums.group_id JOIN ouj2wu4b1u_sftopics ON ouj2wu4b1u_sftopics.topic_id = ouj2wu4b1u_sfposts.topic_id LEFT JOIN ouj2wu4b1u_sfmembers ON ouj2wu4b1u_sfmembers.user_id = ouj2wu4b1u_sfposts.user_id WHERE ouj2wu4b1u_sftopics.post_id = ouj2wu4b1u_sfposts.post_id AND ouj2wu4b1u_sfposts.topic_id IN () AND ouj2wu4b1u_sfposts.forum_id IN (1,2,3,4,5,6) ORDER BY ouj2wu4b1u_sfposts.post_id DESC LIMIT 5

Avatar
RickyMcG
Member
Free Members
sp_UserOfflineSmall Offline
Feb 5, 2015 - 7:25 pm

So, I got things to work by changing the function call to:

 sp_FeaturedPostsTag();
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 5, 2015 - 9:23 pm

you switched from featured topics to featured posts... two different things... but if its giving you what you want, then great!

Avatar
RickyMcG
Member
Free Members
sp_UserOfflineSmall Offline
Feb 6, 2015 - 8:04 am

Mr Papa said
you switched from featured topics to featured posts... two different things... but if its giving you what you want, then great!

Yes. Still couldn't get the topics feed to work. But wound up not using either (for the moment).

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Feb 6, 2015 - 10:23 am

If you decide you want to use either in the future and still can't get them to work, just shout - we will be here!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 6, 2015 - 9:07 pm

I hope to play with the functions this weekend and make sure they havent gotten busted...

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 6, 2015 - 9:49 pm

ah... have you actually defined any featured topic IDs?  on forum - components - featured topics/posts...  looks like an error is generated if you have not defined any topics to feature... 

we should handle that better... will open a ticket...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 649
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 616
Members: 17344
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10117
Posts: 79600