pricecharts

track prices of consumer electronics
Log | Files | Refs | README

commit 5ebc4031f0ee09af347112f4c5be3817ac69b9f4
parent 36589bd188410b3986518a50d6067297fa965b97
Author: Kyle Milz <kyle@getaddrinfo.net>
Date:   Sat,  4 Apr 2015 14:54:33 -0600

pc_fcgi: only display results with at least one price

Diffstat:
Mpc_fcgi | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pc_fcgi b/pc_fcgi @@ -72,8 +72,8 @@ my $config = { INCLUDE_PATH => "$http_cfg{htdocs}/tt" }; my $template = Template->new($config) || die $Template::ERROR . "\n"; # try hard here not to use EVAL_PERL in the template -my $sql = "select manufacturer, part_num, lower(part_num), lower(manufacturer) ". - "from products where part_num like ? or manufacturer like ?"; +my $sql = "select distinct manufacturer, part_num, lower(part_num), lower(manufacturer) ". + "from prices where part_num like ? or manufacturer like ?"; my $search_sth = $dbh->prepare($sql); # intercept signals to shut down cleanly