please forgive my ignorance i am a total newb to php and i just registered on this site....i have a problem with my php script, i want to get the data of daily record input from the database, but when the data displays it says "no available data to display" please help. here is the code for the script.
<?php include("db.php") ?>
<?php
$date = 'Date';
$sql2 = "SELECT * FROM ultrasound('ultrasoundNo', 'PatientName', 'ultrasoundScan', 'RefDoctorName', 'gender', 'age', 'amount','report', 'Date') WHERE Date = $date";
$result = $db -> prepare( $sql2);
$result -> execute();
$outputList = '';
$outputList .= "";
while($row = $result -> fetch( PDO::FETCH_ASSOC )){
$outputList .= '<tr class="odd gradeX">';
$ultrasoundNo = $row["ultrasoundNo"];
$PatientName = $row["PatientName"];
$ultrasoundScan = $row["ultrasoundScan"];
$RefDoctorName = $row["RefDoctorName"];
$gender = $row["gender"];
$age = $row["age"];
$amount = $row["amount"];
$report = $row["report"];
$Date = $row["Date"];
$outputList .= '<td>' . $ultrasoundNo . '</td>' . '<td>' . $PatientName. ' </td>'.
'<td>' . $ultrasoundScan . ' </td>' . '<td>' . $RefDoctorName . ' </td>' . '<td>' . $gender . '</td>' . '<td>' . $age . '</td>' . '<td>' . $amount . '</td>' . '<td>' . $report. '</td>' . '<td>' . $Date . '</td>';
$outputList .= '</tr>';
} // close while loop