okay guys and gals - im trying to write a little script that will help me write other scripts ---->
(BTW Ill post the completed script here for others to use as well)
Here is the prob im facing:
1 im trying to access a MySQL database - using perl - mysqlpp. here is the code:
---------------------------------------
my $dsn = "DBI:mysqlPP:$FORM:ATABASE:$DB::SERVER";
my $dbh = DBI->connect($dsn, $DB::USER, $DB:ASS);
my $sth = $dbh->prepare(qq{ SHOW COLUMNS FROM $FORM::TABLE });
$sth->execute();
while (($DB::01, $DB::02, $DB::03, $DB::04, $DB::05) = $sth->fetchrow_array())
{
$DB::01 =~ s/\s//gi;
$DB::02 =~ s/\s//gi;
$DB::03 =~ s/\s//gi;
$DB::04 =~ s/\s//gi;
$DB::05 =~ s/\s//gi;
$TABLE:ATA .= "<tr>
<td>$DB::NULL</td>
<td>$DB::01</td>
<td>$DB::03</td>
<td>$DB::04</td>
<td>$DB::05</td>
<td>$DB::06</td>
<td>$DB::07</td>
</tr>";
$counter = $ counter + 1;
}
$sth->finish();
$dbh->disconnect();
--------------------------------
the output comes out ALL garbled!!!!!
i cant isolate the table name ~ type etc......
what is it that im doing wrong??? it access the DB correctly NO ERROS when connecting just the format is wrong.
Help!!!
Wise men ask questions, only fools keep quite.
(BTW Ill post the completed script here for others to use as well)
Here is the prob im facing:
1 im trying to access a MySQL database - using perl - mysqlpp. here is the code:
---------------------------------------
my $dsn = "DBI:mysqlPP:$FORM:ATABASE:$DB::SERVER";
my $dbh = DBI->connect($dsn, $DB::USER, $DB:ASS);
my $sth = $dbh->prepare(qq{ SHOW COLUMNS FROM $FORM::TABLE });
$sth->execute();
while (($DB::01, $DB::02, $DB::03, $DB::04, $DB::05) = $sth->fetchrow_array())
{
$DB::01 =~ s/\s//gi;
$DB::02 =~ s/\s//gi;
$DB::03 =~ s/\s//gi;
$DB::04 =~ s/\s//gi;
$DB::05 =~ s/\s//gi;
$TABLE:ATA .= "<tr>
<td>$DB::NULL</td>
<td>$DB::01</td>
<td>$DB::03</td>
<td>$DB::04</td>
<td>$DB::05</td>
<td>$DB::06</td>
<td>$DB::07</td>
</tr>";
$counter = $ counter + 1;
}
$sth->finish();
$dbh->disconnect();
--------------------------------
the output comes out ALL garbled!!!!!
i cant isolate the table name ~ type etc......
what is it that im doing wrong??? it access the DB correctly NO ERROS when connecting just the format is wrong.
Help!!!
Wise men ask questions, only fools keep quite.