Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Price low and High search
- if (($price_low) && ($price_high)){
- $statement .= " OR item_price BETWEEN ? AND ? ";
- push(@binds,$price_low,$price_high);
- }
- elsif (($price_low) && ($price_high eq "")){
- $statement .= " OR item_price > ? ";
- push(@binds,$price_low);
- }
- elsif (($price_high) && ($price_low eq "")){
- $statement .= " OR item_price BETWEEN ? AND ? ";
- push(@binds,1,$price_high);
- }
- else { }
- my $sth = $dbh->prepare(qq(SELECT * FROM ads WHERE $statement )) or die $DBI::errstr;
- $sth->execute(@binds);
- > SELECT '22,500' BETWEEN 1 AND 600;
Advertisement
Add Comment
Please, Sign In to add comment