Hey,
i was just going through search.pm for my morbid curiosity, and in sub query i was wondering what happens if the filter is requested, but actually contains no data..
the code -
$filter = (" and (( " .
join ( ") and ( ", map { "$_ = '". quotemeta($$filterref{$_}) ."'" } keys %$filterref )
. "))" );
$where = "$id_col in (" .
join ( ",", map ( $$_[0], @query_results) ) .
") $filter";
doesn't seem to make sense to me if $filter is empty... also if no results are returned in @query_results, surely that will result in the SQL command being malformed ?
sorry if this has been addressed already, i'm just playing with the code for my buddy and this popped up.
thanks,
toml
i was just going through search.pm for my morbid curiosity, and in sub query i was wondering what happens if the filter is requested, but actually contains no data..
the code -
$filter = (" and (( " .
join ( ") and ( ", map { "$_ = '". quotemeta($$filterref{$_}) ."'" } keys %$filterref )
. "))" );
$where = "$id_col in (" .
join ( ",", map ( $$_[0], @query_results) ) .
") $filter";
doesn't seem to make sense to me if $filter is empty... also if no results are returned in @query_results, surely that will result in the SQL command being malformed ?
sorry if this has been addressed already, i'm just playing with the code for my buddy and this popped up.
thanks,
toml