[Opensource] 5.0 DBObject quoting a 'between' clause incorrectly
Mike Traum
mtraum at cirnetwork.org
Mon Nov 4 19:38:13 PST 2002
I found the problem. Here's the scenario:
SELECT ... FROM ...
WHERE COLUMNNAME BETWEEN '3 and 6'
when COLUMNNAME is a text type (ie varchar)
This is caused by DBMaint.quoteIfNeeded() - it doesn't check for the between
clause.
My work around was to alter the type of the column to be numeric, as it
should have been anyway.
I won't be able to patch this - way too much to do. Can you add this to the
bottom of some list somewhere, Mike?
Thanks,
Mike
-----Original Message-----
From: opensource-admin at jcorporate.com
[mailto:opensource-admin at jcorporate.com]On Behalf Of Mike Traum
Sent: Monday, November 04, 2002 3:18 PM
To: Expresso Mailing List (E-mail)
Subject: [Opensource] 5.0 DBObject quoting a 'between' clause incorrectly
I figured I'd toss this out here in case it has been fixed in 5.0.1, even
though it doesn't appear to have been.
I'm doing a custom where clause with a 'between' comparator, and expresso
ends up generating the following sql:
SELECT ... FROM ...
WHERE COLUMNNAME BETWEEN '3 and 6'
mysql doesn't like the single quotes around the '3 and 6'. I'm working on a
fix right now, but figured I'd toss this out there - this one is critical
for me for a upgrade which is happening asap...
Should I remove these quotes all together, or is there a rdbms that needs
them?
Thanks,
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.jcorporate.com/pipermail/opensource/attachments/20021104/313cc490/attachment-0002.htm
More information about the Opensource
mailing list