title: MySQL join with 2 conditions error
body: <p>I can't figure out why I get an SQL error with the mySQL statement (in php file) below. I think the problem relates to the second condition 'AGREEDPRODUCTS.productid_corporation is null'. I checked that the syntax of the used parameters is correct as used in the database. I also tried other alternatives with respect to the second condition (like using WHERE but that is obvious not allowed;<a href="https://stackoverflow.com/questions/1219909/mysql-join-with-where-clause">MySQL join with where clause</a>) but those didn't work.</p>
  
  <pre><code>$sqlquery4 = "SELECT AGREEDPRODUCTS.id,AGREEDPRODUCTS.productid_supplier,EMETERPRODUCTS.productname "
                  . "FROM AGREEDPRODUCTS "
                  . "INNER JOIN EMETERPRODUCTS "    
                  . "ON AGREEDPRODUCTS.productid_supplier=EMETERPRODUCTS.productid AGREEDPRODUCTS.producttype='EMETER' AND AGREEDPRODUCTS.productid_corporation is null "
                  . "ORDER BY AGREEDPRODUCTS.productid_supplier";
  </code></pre>
  
  <p>Any suggestions?</p>