If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > MYSQL + WP woes help appreciated.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-29-09, 05:48
CinqueXX CinqueXX is offline
Registered User
 
Join Date: Jun 2009
Posts: 3
MYSQL + WP woes help appreciated.

Hi, and thanks for looking.

This tiny piece of code is driving me absolutely nuts.
The error reported by the http server log is:

#1064 - 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 'made by require, require_once, include, get_header, locate_template, load_templa' at line 1

The query is as follows:

Code:
SELECT * FROM `wp_eventscalendar_main` WHERE `eventStartDate` >= '2009-06-28' OR `eventEndDate` >= '2009-06-28' ORDER BY `eventStartDate`, `eventStartTime` LIMIT made by require, require_once, include, get_header, locate_template, load_template, require_once, dynamic_sidebar, call_user_func_array, "WidgetCache->widget_cache_redirected_callback", call_user_func_array, "EC_Widget->display", "EC_Calendar->displayEventList", "EC_DB->getUpcomingEvents"
I have tried everything I can think of including ';' after LIMIT, specifying specific numbers and ranges with and without comment delimeters after...
Reply With Quote
  #2 (permalink)  
Old 06-29-09, 05:52
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 7,269
what do you think or expect the
Code:
made by require, require_once, include, get_header, locate_template, load_template, require_once, dynamic_sidebar, call_user_func_array, "WidgetCache->widget_cache_redirected_callback", call_user_func_array, "EC_Widget->display", "EC_Calendar->displayEventList", "EC_DB->getUpcomingEvents"
is all about
Ive never seen anythign like that in any SQL engine
I'd suggest you have a good look at the help for then MySQL version you are using for details on the limit clause
__________________
I'd rather be riding my Versys
Reply With Quote
  #3 (permalink)  
Old 06-29-09, 06:00
CinqueXX CinqueXX is offline
Registered User
 
Join Date: Jun 2009
Posts: 3
The first part of the query is fine up and and including the LIMIT clause. If a figure or range is left off from LIMIT the server automagically appends 0, 30 as a range.

After the limit query are a bunch of what appear to be UDF's or custom functions called from PHP script.

A google search for "LIMIT made by require, require_once," will show numerous instances of this snippet of code.. I'm just not sure why it's borking for me.
Reply With Quote
  #4 (permalink)  
Old 06-29-09, 06:20
r937 r937 is offline
Registered User
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 16,932
Quote:
Originally Posted by CinqueXX
I'm just not sure why it's borking for me.
i can tell you why

because it's invalid syntax, that's why
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #5 (permalink)  
Old 06-29-09, 06:31
CinqueXX CinqueXX is offline
Registered User
 
Join Date: Jun 2009
Posts: 3
I can totally accept that. I only question why it apparently works for so many others.

Thanks all the same.
Reply With Quote
  #6 (permalink)  
Old 06-29-09, 06:34
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 7,269
I'd suggest you ask that question of the others...
it wont work in MySQL, so I'm mystified as to how it allegedly works for others

thats why I suggest you look at da manuel
run your queries in say MySQl query browser to prove they work before putting the query in code. that way round you will know whether its your sql, your code or possibly something else. if you don't validate your own code and sql it makes it tough for you and others to diagnose where problems lie.

but the again the words after the limit look more like a ragbag of PHP functions as if the code has been sloppily cut & paste/lifted from a PHP site.
__________________
I'd rather be riding my Versys

Last edited by healdem; 06-29-09 at 06:38.
Reply With Quote
  #7 (permalink)  
Old 06-29-09, 06:53
r937 r937 is offline
Registered User
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 16,932
Quote:
Originally Posted by CinqueXX
I only question why it apparently works for so many others.
it doesn't

just like you, i googled it, and the few examples i looked at were all by people either posting questions to get help for the error it caused, or it was an apparently automatic display of a failing query in Wordpress
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On