Do you have to disconnect before calling a sub or can you just disconnect at the end of the calling sub;
ie :
sub somthing {
if (condition) {
connect to mysql .......
perform query ........
if (condition) {
$dbh->disconnect;
&error_sub;
}else{
$dbh->disconnect;
&print_sub
}
else{
&error_sub;
}
}
or is this ok -
sub somthing {
if (condition) {
connect to mysql .......
perform query ........
if (condition) {
&error_sub;
}else{
&print_sub
}
$dbh->disconnect;
else{
&error_sub;
}
}
thanks
Bob
http://totallyfreeads.com
ie :
sub somthing {
if (condition) {
connect to mysql .......
perform query ........
if (condition) {
$dbh->disconnect;
&error_sub;
}else{
$dbh->disconnect;
&print_sub
}
else{
&error_sub;
}
}
or is this ok -
sub somthing {
if (condition) {
connect to mysql .......
perform query ........
if (condition) {
&error_sub;
}else{
&print_sub
}
$dbh->disconnect;
else{
&error_sub;
}
}
thanks
Bob
http://totallyfreeads.com