commit d22384b23f3ae30a91a388a997acc6ab16a8f74d
parent dd3aedd6c220b67b788f79b786605fd8b6c73c09
Author: Kyle Milz <kyle@getaddrinfo.net>
Date: Thu, 2 Apr 2015 19:06:08 -0600
product_scraper: use qq instead of quotes
Diffstat:
1 file changed, 22 insertions(+), 19 deletions(-)
diff --git a/product_scraper b/product_scraper
@@ -27,25 +27,28 @@ my $tmp_file = "/tmp/product_scraper.txt";
my $log = get_log($tmp_file, $args{v});
srand;
-$dbh->do("create table if not exists products(" .
- "manufacturer text not null, " .
- "part_num text not null, " .
- "retailer text not null, " .
- "type text, " .
- "first_seen int, " .
- "last_seen int, " .
- "last_scraped int, " .
- "primary key(manufacturer, part_num))"
-) or die $DBI::errstr;
-
-$dbh->do(qq{create table if not exists descriptions(
- manufacturer text not null,
- part_num text not null,
- retailer text not null,
- description text not null,
- date int not null,
- primary key(manufacturer, part_num, retailer, description),
- foreign key(manufacturer, part_num) references products(manufacturer, part_num))
+$dbh->do(qq{
+ create table if not exists products(
+ manufacturer text not null,
+ part_num text not null,
+ retailer text not null,
+ type text,
+ first_seen int,
+ last_seen int,
+ last_scraped int,
+ primary key(manufacturer, part_num))
+}) or die $DBI::errstr;
+
+$dbh->do(qq{
+ create table if not exists descriptions(
+ manufacturer text not null,
+ part_num text not null,
+ retailer text not null,
+ description text not null,
+ date int not null,
+ primary key(manufacturer, part_num, retailer, description),
+ foreign key(manufacturer, part_num) references
+ products(manufacturer, part_num))
}) or die $DBI::errstr;
# $dbh->do("create table if not exists scrapes");