ido50 has asked for the wisdom of the Perl Monks concerning the following question:
The output here will utterly be nothing. The only thing that will be printed is the output from $q->start_html. No output is given from $q->end_html.my $q = new CGI; print $q->header, $q->start_html(-title=>'Test'); my $dbh = DBI->connect("dbi:SQLite:dbname=$dbfile","","", { RaiseError + => 1 }); for my $sql( split /;\n+/," CREATE TABLE user ( user_name TEXT, phone TEXT ); INSERT INTO user VALUES ('Fred Bloggs','233-7777'); INSERT INTO user VALUES ('Sanjay Patel','777-3333'); INSERT INTO user VALUES ('Junk','xxx-xxxx'); DELETE FROM user WHERE user_name = 'Junk'; UPDATE user SET phone = '999-4444' WHERE user_name = 'Sanjay Patel +'; SELECT * FROM user "){ my $sth = $dbh->prepare($sql); $sth->execute; $sth->dump_results() if $sth->{NUM_OF_FIELDS}; } $dbh->disconnect; print $q->end_html;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SQL INSERTs don't work
by davorg (Chancellor) on Nov 08, 2004 at 13:44 UTC | |
by tinita (Parson) on Nov 08, 2004 at 14:26 UTC | |
|
Re: SQL INSERTs don't work
by reneeb (Chaplain) on Nov 08, 2004 at 13:45 UTC | |
by thor (Priest) on Nov 08, 2004 at 13:48 UTC | |
by dragonchild (Archbishop) on Nov 08, 2004 at 14:14 UTC | |
by thor (Priest) on Nov 08, 2004 at 21:59 UTC | |
by dragonchild (Archbishop) on Nov 09, 2004 at 13:50 UTC | |
|
Re: SQL INSERTs don't work
by jZed (Prior) on Nov 08, 2004 at 16:00 UTC | |
by ido50 (Scribe) on Nov 09, 2004 at 20:29 UTC | |
|
Re: SQL INSERTs don't work
by erix (Prior) on Nov 08, 2004 at 14:25 UTC |