Actually I am creating a database by the help of perl and mysql, part of retrieving has been done through perl but now I can't understand how to display it's output on a webpage.So can anyone tell me how to do this?
code is:
code is:
Code:
# PERL MODULES WE WILL BE USING
use DBI;
use DBD::mysql;
# CONFIG VARIABLES
$platform = "mysql";
$database = "purchase";
$port = "3306";
$host = "localhost";
$user = "root";
$pw = "";
#DATA SOURCE NAME
$dsn = "dbi:mysql:$database:localhost:3306";
# PERL DBI CONNECT
$DBIconnect = DBI->connect($dsn, $user, $pw)or die "unable to connect:$DBI::errstr\n";
#PREPARE THE QUERY
$query = "SELECT * FROM naipone WHERE Fileno = '4-56/2008-09/AG(S)'";
$query_handle = $DBIconnect->prepare($query);
#EXECUTE THE QUERY
$query_handle->execute();
#BIND TABLE COLUMNS TO VARIABLES
$query_handle->bind_columns(\$Sanctionamt, \$Availableamt, \$Dateoffirstrelease, \$Amtoffirstrelease, \$Dateofsecondrelease, \$Amtofsecondrelease, \$Netamt, \$Fileno, \$fileinitiation, \$nameofindenter, \$materialreceivedpurchasedandpaymentreleased, \$nameoffirm, \$completeaddressoffirm, \$head, \$subhead, \$sanctioneddate, \$sanctionedamt, \$progressivebal, \$sanctionedbal, \$billdate, \$billamt, \$billbal);
#LOOP THROUGH RESULTS
while($query_handle->fetch())
{
print"$Sanctionamt,$Availableamt,$Dateoffirstrelease,$Amtoffirstrelease,$Dateofsecondrelease,$Amtofsecondrelease,$Netamt,$Fileno,$fileinitiation,$nameofindenter,$materialreceivedpurchasedandpaymentreleased,$nameoffirm,$completeaddressoffirm,$head,$subhead,$sanctioneddate,$sanctionedamt,$progressivebal,$sanctionedbal,$billdate,$billamt,$billbal <br>";
}
Comment