in reply to Re: Images
in thread Images
#!/usr/bin/perl use DBI; $user="mydb1"; $password="mydb1"; print "Content-type:text/html\n\n"; my $dbh = DBI->connect("dbi:mysql:mydb", $user, $password) or die "Can +'t connect to $data_source: $DBI::errstr"; print "successful connection\n"; my $sth = $dbh->prepare( q{SELECT sno, name FROM IMAGE}) or die "Can't + prepare statement: $DBI::errstr"; my $rc = $sth->execute or die "Can't execute statement: $DBI::errstr +"; print "Query will return $sth->{NUM_OF_FIELDS} fields.\n\n"; print "Field names: @{ $sth->{NAME} }\n"; while (($sno, $name) = $sth->fetchrow_array) { print "<h6>$name: $phone</h6>\n"; $line="<img src=".$name; $line=$line." >"; print "<img src=\"$line\">"; } $dbh->disconnect; print "succefully disconnected\n"; print "</body></html>\n";
edited: Thu Oct 24 14:51:47 2002 by jeffa - code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Images
by sch (Pilgrim) on Oct 24, 2002 at 10:48 UTC | |
|
Re: Images
by phawley (Novice) on Oct 24, 2002 at 13:52 UTC | |
by Anonymous Monk on Oct 25, 2002 at 10:32 UTC | |
by sch (Pilgrim) on Oct 25, 2002 at 10:41 UTC | |
|
Re: Images
by x31forest (Novice) on Oct 24, 2002 at 20:32 UTC |