#!/usr/bin/env perl use warnings; use strict; use 5.10.1; use DBI; my $db = 'TestDatabase'; my $dbh = DBI->connect( "dbi:SQLite:dbname=$db", "", "", { RaiseError => 1, PrintError => 0 } ) or die DBI->errstr; my $table = 'Test_Table'; $dbh->do( "DROP TABLE IF EXISTS $table" ); $dbh->do( "CREATE TABLE $table ( Id INTEGER PRIMARY KEY, Rating TEXT, Downloads INTEGER )" ); my $sth = $dbh->prepare( "INSERT INTO $table ( Id, Rating, Downloads ) VALUES ( ?, ?, ? )" ); $sth->execute( undef, "2.0", 7449 ); $sth->execute( undef, "2.7", 7048 ); $sth->execute( undef, "2.4", 4877 ); $sth->execute( undef, "3.0", 10486 ); $sth->execute( undef, "3.1", 8119 ); $sth->execute( undef, "3.0", 10706 ); $sth->execute( undef, "2.8", 4795 ); $sth->execute( undef, "3.8", 5879 ); $sth->execute( undef, "4.1", 7252 ); $sth->execute( undef, "3.6", 6259 ); $sth->execute( undef, "2.8", 6615 ); $sth->execute( undef, "4.9", 5275 ); $sth->execute( undef, undef, 3638 ); $sth->execute( undef, undef, 3690 ); $sth->execute( undef, undef, 3283 ); $sth->execute( undef, undef, 2568 ); $sth->execute( undef, "3.2", 4950 ); $sth->execute( undef, undef, 3211 ); $sth->execute( undef, undef, 3876 ); $sth->execute( undef, undef, 2308 ); $sth->execute( undef, "3.2", 3864 ); $sth->execute( undef, "4.8", 18707 ); $sth->execute( undef, undef, 3395 ); $sth->execute( undef, undef, 2927 ); $sth->execute( undef, "1.8", 2291 ); $sth->execute( undef, "4.1", 7252 ); $sth->execute( undef, "3.6", 6259 ); $sth->execute( undef, "2.8", 6615 ); $sth->execute( undef, "4.9", 5275 ); $sth->execute( undef, undef, 3638 ); $sth->execute( undef, undef, 3690 ); $sth->execute( undef, undef, 3283 ); $sth->execute( undef, undef, 2568 ); $sth->execute( undef, "3.2", 4950 ); $sth->execute( undef, undef, 3211 ); $sth->execute( undef, undef, 3876 );