PDA

View Full Version : Problem in NULL value



newphpbees
21 Dec 2011, 08:48 PM
Hi...
i have table
EMP_NO
LOGIN - DATETIME, NULL
LOGOUT - DATETIME, NULL

I have this query:



<?php

include 'config.php';

$currentEmpID = $_SESSION['empID'];

if(!isset($_POST['submit_'])){

$DATE1 = $_POST['firstinput'];
$DATE2 = $_POST['secondinput'];


$sql = "SELECT EMP_NO, LOGIN, LOGOUT FROM employee_attendance WHERE DATE(LOGIN) BETWEEN '$DATE1' AND '$DATE2'";
$attendance = $conn3->GetAll($sql);

$smarty->assign('attendance', $attendance);

}
$smarty->display('header_att.tpl');
$smarty->display('empAttendance.tpl');
$smarty->display('footer.tpl');

?>


My problem is I have data
EMP_NO 00000223
LOGIN NULL
LGOUT NULL

this data was not displayed because it has a null value.. i want it to displayed also and highlight it because it has a value null..

Thank you