[rt-users] Bizzarre Error

Mathew Snyder theillien at yahoo.com
Fri Jun 1 04:24:20 EDT 2007


I have a FromSQL query I'm trying to run:
my $tix = new RT::Tickets(RT::SystemUser);
$tix->FromSQL('Queue = "CustomerCare" AND ((LastUpdated > ' . $date[0] . ' AND
LastUpdated < ' . $date[$#date] . ') OR (LastUpdated = ' . $date[0] . ' OR
LastUpdate = ' . $date[$#date] . '))');

I'm editing this in vim so when I land on a parenthesis the matching
closing/opening parenthesis is highlighted.  As far as I can tell, all
parentheses are paired up.  However, when I run the script, I get the following
error:
[error]: Query error in <<Queue = "CustomerCare" AND ((LastUpdated > 2007-05-01
AND LastUpdated < 2007-05-31) OR (LastUpdated = 2007-05-01 OR LastUpdate =
2007-05-31))>>:
Error near ->05<- expecting a CLOSE_PAREN in Queue = "CustomerCare" AND
((LastUpdated > 2007-05-01 AND LastUpdated < 2007-05-31) OR (LastUpdated =
2007-05-01 OR LastUpdate = 2007-05-31))
(/usr/local/rt-3.6.1/lib/RT/Tickets_Overlay_SQL.pm:487)

What's "Error near ->05<-" supposed to mean?  There's 4 of them in the query.

Mathew
-- 
Keep up with me and what I'm up to: http://theillien.blogspot.com



More information about the rt-users mailing list