title: Checking for empty fields without using fetch
body: <p>I am having some problems with checking if the field is empty or not in SQL using PHP without using mysql_fetch_array().</p>
  
  <p>I have this code:<br/></p>
  
  <pre><code>date_default_timezone_set('Asia/Taipei');
  $remarks = $_POST['remarks'];
  $date_added = date ("Y-m-d");
  $time_added = date ("h:i:s a");
  $lname = $_SESSION['user']['last_name'];
  $fname = $_SESSION['user']['first_name'];
  $minitial = $_SESSION['user']['middle_initial'];
  $con = mysqli_connect("localhost", "root", "", "thisdb");
  
  
  if(empty(`TIME_IN_1`)) {
  $query = "INSERT INTO time_logs (LAST_NAME, FIRST_NAME, MIDDLE_INITIAL, DATE, TIME_IN_1, TIME_IN_1_REMARKS) VALUES('$lname', '      $fname', '$minitial', '$date_added', '$time_added', '$remarks')";
  }
  
  else {
  $query =  "UPDATE time_logs SET TIME_IN_2 = '$time_added' where LAST_NAME = '$lname' AND DATE = '$date_added'";
  }
  
  $save = mysqli_query($con, $query);
  header("Location: time_in_complete.php");
  </code></pre>
  
  <p>What I basically want to accomplish is if the TIME_IN_1 field is empty, the data will be added there. If it is not empty, then the data will be added to the TIME_IN_2.<br></p>
  
  <p>Apprently, this line:</p>
  
  <pre><code>if(empty(`TIME_IN_1`))
  </code></pre>
  
  <p>doesn't seem to work.</p>