in reply to Using External Subroutines
sub check { $statement = 'SELECT * FROM users'; $dbh = DBI->connect("DBI:mysql:$DBNAME:localhost","user","pass"); $sth = $dbh->prepare($statement); $sth->execute(); while(my $ref = $sth->fetchrow_hashref()) { $address= $ref->{'add'}; $phone= $ref->{'phone'}; $password= $ref->{'pass'}; } }
Thats not the actual files but it will give you an idea of what i am doing, the $name would produce a -w error saying used only oncerequire "config.pl"; check(); print "$name";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Using External Subroutines
by data64 (Chaplain) on Nov 19, 2001 at 01:50 UTC | |
by Anonymous Monk on Nov 19, 2001 at 02:56 UTC | |
by data64 (Chaplain) on Nov 19, 2001 at 03:06 UTC | |
by hopes (Friar) on Nov 19, 2001 at 04:09 UTC |