DVD Transaction Listing

".$selectSql); // Loop through the result set while($row = mysql_fetch_array($result)) { // Retrieve the columns from the result set into local variables $transId = $row["TransID"]; $orderId = $row["OrderID"]; $dvdId = $row["DVDID"]; $dateOut = $row["DateOut"]; $dateDue = $row["DateDue"]; $dateIn = $row["DateIn"]; $custFirstName = $row["CustFN"]; $custLastName = $row["CustLN"]; $dvdName = $row["DVDName"]; // Convert nulls to empty strings and format the data $customerName = ""; $dateOutPrint = ""; $dateDuePrint = ""; $dateInPrint = ""; if($custFirstName != null) $customerName .= $custFirstName." "; if($custLastName != null) $customerName .= $custLastName; if($dvdName == null) $dvdName = ""; $dateFormat = "m-d-Y"; if($dateOut != null) $dateOutPrint = date($dateFormat, strtotime($dateOut)); if($dateDue != null) $dateDuePrint = date($dateFormat, strtotime($dateDue)); if(strcmp($dateIn, "0000-00-00") != 0) $dateInPrint = date($dateFormat, strtotime($dateIn)); // Print each value in each row in the HTML table ?>
Order Number Customer DVDName DateOut DateDue DateIn