Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
SQL Syntax Error Report
Avatar
jim
Here and Now
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Dec 9, 2015 - 10:48 pm

Toolbox - Error Log: Error
Errors should be reported to Simple:Press support...

Here's one for you...

9 October 2015 5:05 am | spaErrError | 1 | database


file: /home/tripawds/public_html/wp-content/plugins/simple-press/forum/content/classes/sp-search-view-class.php
line: 228
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 '-30, 30' at line 1

SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_1_sfposts.topic_id FROM wp_1_sfposts WHERE user_id=7341 AND post_index=1 AND wp_1_sfposts.forum_id IN (5,6,7,20,9,8,19,10,17,11,15,12,4,24,14,13,22,18,16,1,25) ORDER BY wp_1_sfposts.topic_id DESC LIMIT -30, 30

 

This has clearly been in the log a while, and I don't think we're experiencing any symptoms. But it's an error, so I figured it should be reported nonetheless.

Any questions, jut let me know!

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 10, 2015 - 12:20 am

hmmm...  the problem there is the -30...  but not quite sure how you could have gotten that there... 

it seems to indicate you had perhaps a negative page for the search query... and to get that, I think it would have manually had to be entered...  will have to see if another way to get it, but worth noting you only see it once... but we will take a look...

Avatar
jim
Here and Now
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Dec 11, 2015 - 12:14 am

Mr Papa said
...you had perhaps a negative page for the search query...

Guess I'm not exactly sure what that means, but I figured it was probably a fluke.

Thanks anyway!

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 11, 2015 - 4:20 am

Steve was proposing that someone used the 'jump to page' form and entered a negative number. Seems a likely scenario actually. While a nonsense thing to do we should be able to prevent that actually. I will take a look when I have some spare time...

andy-signature.png
YELLOW
SWORDFISH
Avatar
jim
Here and Now
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Dec 11, 2015 - 12:00 pm

Yellow Swordfish said
Steve was proposing that someone used the 'jump to page' form and entered a negative number...

Makes sense, and would explain the rare occurrence.

Thanks for the clarification!

This obviously isn't important and I'm sure you have bigger fish to fry...but for what it's worth, I just tested your theory.

Jump to page with value of -3 in a three-page forum returned me to page 1 of the thread, with no error displayed nor generated in the log. And a jump to page 5 in the same forum took me to page 3, also with no error.

I say blame it on the gremlins.

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 11, 2015 - 3:17 pm

Yes - I tried it also after I wrote that explanation and saw it couldn't really be the issue...
Another method would be someone putting it in the url to see what happened. That wouldn't have the same check.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 11, 2015 - 10:52 pm

changing the url is actually what I meant...  it doesnt have a guard check for page being less than 1...   we should probably add at some point - its an error condition, but would prevent us from generating mysql error... 

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: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620