title: php mysql if row is empty and if isn't empty
body: <p>Code:</p>
  
  <pre><code>   $Username = $_SESSION['VALID_USER_ID'];
  
     $q = mysql_query("SELECT * FROM `article_table` 
                        WHERE `Username` = '$Username' 
                        ORDER BY `id` DESC");
  
     while($db = mysql_fetch_array($q)) { ?&gt;
  
         &lt;?php if(!isset($db['article'] &amp;&amp; $db['subject'])) { 
             echo "Your articles";  
         } else { 
               echo "You have no articles added!"; 
         } ?&gt;    
  
     &lt;?php } ?&gt;
  </code></pre>
  
  <p>So I want the rows for example(<code>db['article']</code> and <code>$db['subject']</code>) from a specific username (see: <code>$Username = $_SESSION['VALID_USER_ID'];</code>) to echo the information if is not empty else if is empty to echo  for example "You have no articles added!"</p>
  
  <p>If is some information in the rows the code works, echo the information BUT if the rows is empty don't echo nothing, the code should echo "You have no articles added!" but this line don't appear, where is the mistake?</p>
  
  <p>I tried for if <code>!isset</code>, <code>!empty</code>, <code>!is_null</code> but don't work.</p>