ginda has asked for the wisdom of the Perl Monks concerning the following question:
#!c:/perl/bin/perl -wt use strict; use CGI; $Query = new CGI; use DBI; $dbh = DBI->connect("DBI:mysql:exelstock") or die "Cannot connect: " . $DBI::errstr; $Value = $Query->param('Value'); $sth = $dbh->prepare("SELECT * FROM stock WHERE name='$Value'"); $sth = $dbh->execute(); print "Content-type: text/html\n\n"; print "<HTML>\n"; print "<BODY>\n"; while (@results = $sth->fetchrow_array) { print "@row\n"; } $sth = $dbh->finish(); $dbh->disconnect(); print "</BODY>\n"; print "</HTML>\n";
20050301 Janitored by Corion: Put code in code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Cannot run a simple script?help im new
by Zaxo (Archbishop) on Mar 01, 2005 at 05:28 UTC | |
|
Re: Cannot run a simple script?help im new
by jpeg (Chaplain) on Mar 01, 2005 at 05:26 UTC | |
|
Re: Cannot run a simple script?help im new
by PodMaster (Abbot) on Mar 01, 2005 at 05:29 UTC | |
|
Re: Cannot run a simple script?help im new
by matthewb (Curate) on Mar 01, 2005 at 11:57 UTC | |
by ginda (Initiate) on Mar 02, 2005 at 04:25 UTC | |
by Tanktalus (Canon) on Mar 02, 2005 at 04:27 UTC | |
|
Re: Cannot run a simple script?help im new
by Nevtlathiel (Friar) on Mar 01, 2005 at 08:59 UTC | |
|
Re: Cannot run a simple script?help im new
by chas (Priest) on Mar 01, 2005 at 05:47 UTC |