title: How to check whether a table exists in my database
body: <p>My page </p>
  
  <blockquote>
    <p>displays "mysql_num_rows() expects parameter 1 to be resource,
    boolean given in ....</p>
  </blockquote>
  
  <p>table does not exist" I dont know where my problem is.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>$sql="SELECT * 
      FROM              
      $db_name    WHERE 
      table_name='{$_SESSION
      ["group"]}'";
      $texist=mysql_query($sql);
      $count=mysql_num_rows($texist);
  
      if($count==1){
      echo"table exists";
      }else{
      echo "table does not exist";
      }
  </code></pre>