|
#!/usr/bin/perl
use DBI;
use CGI qw(param());
$b_type = param("B");
$thebrand = "like ". "'" . param("B") . "'";
# edit the two variables below with your own details
$sqluser = "ahrint";
$sqlpass = "vqtltw";
$sqldb = "ahrintdb";
$hostname = "212.67.202.146";
$dsn = "dbi:mysql:$sqldb:$hostname";
print "Content-type: text/html\n\n";
unless ($db = DBI->connect($dsn,$sqluser,$sqlpass)) {
print "Error: couldn't connect.";
exit(1);
}
#print "Dental bearings under the $b_type brand";
#print " ";
#print "$b_type dental bearings";
#print "$thepart\n";
#print "$descpart\n";
$sql = "SELECT modal,ID,OD,Width,Notes FROM dental WHERE brand $thebrand";
#$sql = "SELECT modal,ID,OD,Width,Notes FROM dental WHERE brand like 'Kavo' ";
#print $sql;
$sth = $db->prepare($sql);
$sth->execute;
#print " CLICK TO CLOSE WINDOW ";
print "";
print "| Model | ID | OD | Width | Notes | ";
while( ($modal,$ID,$OD,$Width,$Notes) =$sth->fetchrow() ) {
if($ID eq 0) {
$ID = "not known";
}
if($OD eq 0) {
$OD = "not known";
}
if($Width eq 0) {
$Width = "not known";
}
print "";
print"| $modal | ";
print"$ID | ";
print"$OD | ";
print"$Width | ";
print"$Notes | ";
print " ";
}
print " ";
print "All dimensions in mm unless the inch symbol (\") is used. ";
print "rqd = REQUIRED, ie 2RQD implies 2 bearings required for this model. ";
print "AHR International Ltd accepts no responsability for the accuracy of the information shown.
";
print "BACK TO ALL THE BRANDS";
#print "\n";
$db->disconnect;
exit(0);
|