Skip Menu |

This queue is for tickets about the SQL-Statement CPAN distribution.

Report information
The Basics
Id: 52356
Status: resolved
Priority: 0/
Queue: SQL-Statement

People
Owner: REHSACK [...] cpan.org
Requestors: DetlefPilzecker [...] web.de
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.23
Fixed in: 1.24



Subject: calculations not supported inside query?
I use SQL-Statement with DBD::CSV and I wanted to do the following: do( "DELETE FROM log WHERE time<( 1259763423 - ( $x * 60 ) ) OR username_or_IP IN ( ?, ? )", "", $y, $z ) then I got the error: "Undefined subroutine &SQL::Statement::Function::NumericEval::_INSTANCE called at ..../SQL/Statement/Function.pm line 208, line 2." The real query was: ( "DELETE FROM log WHERE time<( 1259763423 - ( 15 * 60 ) ) OR username_or_IP IN ( ?, ? )", "", "admin", "95.90.205.74" ) This happens after I added "( 1259763423 - ( $x * 60 ) )" into the DB- query. If I do this calculation outside and write "... time<$i ..." everything works good. Are calculations not supported by SQL-Statement? If so, can this be implemented in a future update of your module?
Bad developer ;) Thanks, that's provides a new test case and points out a bug. This should work. I'll handle it asap. Thanks for reporting. Jens
Fix applied and test to svn repository. Will be delivered with next release.
The reported issue should be fixed and work well with SQL::Statement 1.24 or newer.