[rt-users] Bizzarre Error - Disregard

Mathew Snyder theillien at yahoo.com
Fri Jun 1 05:22:21 EDT 2007


In keeping with my habit of solving my problem after asking about it, I've done
so.  I didn't place the proper quotes where they needed to be.

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


Mathew Snyder wrote:
> 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



More information about the rt-users mailing list