+ Reply to Thread
Results 1 to 3 of 3

Thread: NULL value problem

  1. #1
    Junior Member
    Join Date
    Feb 2012
    Posts
    2

    NULL value problem

    Hello!
    I have:

    Code:
    <?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..

    Any ideas?

  2. #2
    Junior Member
    Join Date
    Feb 2012
    Posts
    1
    "SELECT EMP_NO, LOGIN, LOGOUT FROM employee_attendance WHERE (DATE(LOGIN) BETWEEN '$DATE1' AND '$DATE2') or LOGIN IS NULL ?

  3. #3
    Junior Member
    Join Date
    Feb 2012
    Posts
    2
    Thanks for your fast response!

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts