title: Select 2 tables from 1 database in PHP Mysql
body: <p>What code can I use in order to select 2 tables from 1 database?</p>
  
  <pre><code>Warning: mysql_num_rows() expects exactly 1 parameter, 2 given in 
  C:\xampp\htdocs\addeditdelete1\exec.php on line 19(this error is on,
  $count=mysql_num_rows($result,$result1); )
  </code></pre>
  
  <p><strong>PHP code:</strong>    </p>
  
  <pre><code>include("dbcon.php");
  
  $username=$_POST['username'];
  
  $password=$_POST['password'];
  
  
  $username = stripslashes($username);
  
  $password = stripslashes($password);
  
  $username = mysql_real_escape_string($username);
  
  $password = mysql_real_escape_string($password);
  
  
  
  $sql="SELECT * FROM admininfo WHERE username='$username' and password='$password' and type='admin'";
  
  $sql1="SELECT * FROM customerinfo WHERE username='$username' and password='$password' and type='customer'";
  
  $result=mysql_query($sql);
  
  $result1=mysql_query($sql1);
  
  //error in this line of code
  
  $count=mysql_num_rows($result,$result1);
  
  if($count==1){
  
  $_SESSION["username"];
  
  $_SESSION["password"];
  
  header("location:menu.php");
  }
  
  else
  {
  
  echo "Invalid username or password!";
  }
  </code></pre>