-1
mysqli中的這個查詢有什麼問題嗎?我把它從mysql轉換而來,工作完美,但現在它不是這個查詢有什麼問題嗎? mysqli命令新增
mysqli_query($con,"SELECT * FROM signed_out_students WHERE date = '$date6' AND time_in = '' order by time_out DESC");
這是如何適合實際的代碼。我知道今天的日期有數據庫中的條目,但沒有顯示它們? D:
else if (out == $display) {
date_default_timezone_set('NZ');
$date6 = date('d.m.Y');
$result4 = mysqli_query($con,"SELECT * FROM signed_out_students WHERE date = '$date6' AND time_in = '' order by time_out DESC");
echo '<table border="0">';
echo '<tr>';
echo '<td width="70px"><h2>Date</h2>';
echo '</td>';
echo '<td width="150px"><h2>Name</h2>';
echo '</td>';
echo '<td width="90px"><h2>Form Class</h2>';
echo '</td>';
echo '<td width="70px"><h2>Time Out</h2>';
echo '</td>';
echo '<td width="70px"><h2>Time In</h2>';
echo '</td>';
while($row4 = mysqli_fetch_array($result4))
{
echo '<tr>';
echo '<td><p>' . $row4['date'];
echo '</td>';
echo '<td><p>' . $row4['name'];
echo '</td>';
echo '<td><p>' . $row4['form_class'];
echo '</td>';
echo '<td><p>' . $row4['time_out'];
echo '</td>';
echo '<td><p>' . $row4['time_in'];
if ($row['time_in'] == "") { echo '-';}
echo '</td>';
}
echo '</table>';
}
謝謝你們!
閱讀http://php.net/manual/en/mysqli.error.php – estrar 2013-03-08 11:04:51