I am creating a booking schedule. When someone books a specific date and time, I hope to show the results to the administrator in the form of a schedule table. However currently I have managed to get the select statement to work and change the background colour of a specific cell.
I was wondering if anyone knew a way in which I could put many select statements into the one table, as the problem at the moment is that if I had 2 select statements for example 10 o clock and 1 o clock, it would produce 2 seperate html tables!
Sorry for trying to describe my problem poorly but...
here is the code so far!:
$dbh = DBI->connect($dsn, {RaiseError =>1});
$sth = $dbh->prepare("SELECT * FROM booking WHERE '$starttime 10:00:00'"
$sth->execute();
print "Content-type: text/html\r\n\r\n";
print "Results of booking search:";
print "<br>";
while (my $hashref = $sth->fetchrow_hashref()) {
print "<br>";
print "<table width=100% border=1 bordercolor=#000000>";
...
then I list the table as a schedule, however every cell is white except the one that matches the select statement for example ..
print "<td bgcolor=#ff0000> </td>";
then
$sth->finish();
$dbh->disconnect();
exit(0);
Any ideas or suggestions to help would be really appreciated!!!
Si22
I was wondering if anyone knew a way in which I could put many select statements into the one table, as the problem at the moment is that if I had 2 select statements for example 10 o clock and 1 o clock, it would produce 2 seperate html tables!
Sorry for trying to describe my problem poorly but...
here is the code so far!:
$dbh = DBI->connect($dsn, {RaiseError =>1});
$sth = $dbh->prepare("SELECT * FROM booking WHERE '$starttime 10:00:00'"
$sth->execute();
print "Content-type: text/html\r\n\r\n";
print "Results of booking search:";
print "<br>";
while (my $hashref = $sth->fetchrow_hashref()) {
print "<br>";
print "<table width=100% border=1 bordercolor=#000000>";
...
then I list the table as a schedule, however every cell is white except the one that matches the select statement for example ..
print "<td bgcolor=#ff0000> </td>";
then
$sth->finish();
$dbh->disconnect();
exit(0);
Any ideas or suggestions to help would be really appreciated!!!
Si22