Skip Menu |

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

Report information
The Basics
Id: 17702
Status: new
Priority: 0/
Queue: SQL-Abstract-Limit

People
Owner: Nobody in particular
Requestors: alan.humphrey [...] comcast.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.12
Fixed in: (no value)



Subject: GenericSubQ doesn't handle empty 'where' clause
The sql generated when there is no 'where' value is incorrect. This code: @order = (); @fields = ('artistid, name'); %where = (); $stmt = $sql->select('artist', \@fields, \%where, \@order, 3, 2 ); print $stmt . "\n"; Produces: SELECT artistid, name FROM artist AND ( SELECT COUNT(*) FROM artist WHERE artistid > X.artistid ) BETWEEN 2 AND 5 ORDER BY artistid DESC And this code: $stmt = $sql->select('artist', \@fields, '', \@order, 3, 2 ); print $stmt . "\n"; Produces: SELECT artistid, name FROM artist X WHERE ( ) AND ( SELECT COUNT(*) FROM artist WHERE artistid > X.artistid ) BETWEEN 2 AND 5 ORDER BY artistid DESC