insert ignore into ffzg_inventura
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 30 Oct 2018 07:45:11 +0000 (08:45 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 30 Oct 2018 07:45:11 +0000 (08:45 +0100)
barcode-seen.pl

index 405c5df..e53fb64 100755 (executable)
@@ -24,6 +24,9 @@ my $sth_update = $dbh->prepare(qq{
 update items set datelastseen = now() where barcode = ?
 });
 
+my $sth_inventura = $dbh->prepare(qq{
+insert ignore into ffzg_inventura (date_scanned,barcode,source_id) values (date(now()), ?, 'abc')
+});
 get '/' => sub {
        my $c = shift;
 
@@ -35,6 +38,7 @@ get '/' => sub {
                $c->stash( $_ => $row->{$_} ) foreach keys %$row;
        }
        $sth_update->execute( $barcode );
+       $sth_inventura->execute( $barcode );
        $c->render(template => 'index');
 };
 
@@ -57,6 +61,7 @@ __DATA__
 <!DOCTYPE html>
 <html>
   <head>
+  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
   <style>
        body {
                font-size: 800%;