title: Is this secure enough in php/mysql?
body: <p>I'm running this query to fetch a post, if the member has access to it. Is it secure enough to just check <code>if($row)</code> ?</p>
  
  <pre><code>$sql = "SELECT f_title
              FROM fields
              INNER JOIN members
                  ON m_group_id = f_group_id
                  AND m_u_id = " . mysqli_real_escape_string($db_link, $_SESSION['u_id']) . "
                  AND m_status &gt; 0
              WHERE f_id = " . mysqli_real_escape_string($db_link, $_POST['id']) . "
              LIMIT 1";
  $result = mysqli_query($db_link, $sql) or die(mysqli_error($db_link));
  $row = mysqli_fetch_assoc($result);
  if($row)
  {
      echo 'Permission granted!';
  }
  else
  {
      echo 'Permission NOT granted!';
  }
  </code></pre>