MySQL Forums
Forum List  »  InnoDB

Query String Too Long??
Posted by: Ben Sullins
Date: May 07, 2005 02:34PM

Greetings...

I am running into a problem here when using a sub query. It works on my local and dev servers but not on production. It seems to be a version issue.

On my productoin server the mysql version is 4.0.24-standard-log . It appears that there is a query string limit here as the following query works fine on dev (4.1.11-standard) but gives the below error on production.

select teeid, description from tee where teeid in (select teeid from courses where name = "Rolling Hills Golf Course") and teeid not in (select teeid from tee where teeid = 3)

[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 'select teeid from courses where name = "Rolling Hills Golf Cour
[/ERROR]

What leads me to believe that this error is related to the length of the query string is that when I delete the spaces from (name = "Rolling Hills Golf Course") the error changes to this:

[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 'select teeid from courses where name="Rolling Hills Golf Course
[/ERROR]

Has anyone encountered this before?

How did you get around it?

I don't think my web host is going to be kind enough to upgrade their mysql version for just me...

Thanks in adv...

--
Ben Sullins
www.kingofthegreens.com

Options: ReplyQuote


Subject
Views
Written By
Posted
Query String Too Long??
9065
May 07, 2005 02:34PM
3340
May 08, 2005 09:28AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.