my $self = {};
bless ($self, $class);
- $self->{'Table'} = shift unless defined ( $self->table );
+ unless defined ( $self->table ) {
+ $self->{'Table'} = shift;
+ carp "warning: FS::Record::new called with table name ". $self->{'Table'};
+ }
my $hashref = $self->{'Hash'} = shift;
$statement .= ' WHERE '. join(' AND ', map {
if ( ! defined( $record->{$_} ) || $record->{$_} eq '' ) {
if ( driver_name =~ /^Pg$/i ) {
- "$_ IS NULL";
+ qq-( $_ IS NULL OR $_ = '' )-;
} else {
qq-( $_ IS NULL OR $_ = "" )-;
}