title: MySQL left join - PHP Call to a member function fetch_assoc() on a non-object
body: <pre><code>$sql = "SELECT * FROM product_suplier LEFT JOIN furnizor ON furnizor.id_furnizor=product_suplier.id_furnizor WHERE product_suplier.id_product=$_GET[id])";
          $result = $conn-&gt;query($sql);
          while($row_furnizor = $result-&gt;fetch_assoc()) {
          echo $row_furnizor['name'].' - adresa: '.$row_furnizor['adresa']; }
  </code></pre>
  
  <p>PHPMyadmin result is: </p>
  
  <p>nr_id ...|...   id_product  ...|... id_suplier  ...|... id_suplier  ...|...name     ...|... adress  </p>
  
  <p>2   .........|...  2    ..................|...1     ...................|....1   ...............|... Calvin .|... Amsterdam<br>
  3 .........|... 2 ..................|...    2 ..................|...    2 ...............|...   Care    ...|... London</p>
  
  <p>Error:  Fatal error: Call to a member function fetch_assoc() on a non-object</p>