title: Error TPL PHP Prestashop
body: <p>I am working on Prestashop and I would like to retrieve the data from a table I created in my database. I've been on it for 2 days and nothing works, I'll go crazy.</p>
  
  <p>Here is the code I put in my ProductController.php file:</p>
  
  <pre><code>    private function GetAvailableAttributes($id_produit, $id_compte, $note)
      {      
      global $smarty;  
  $sql = 'SELECT id_produit, id_compte, note
          FROM `'.'ps_product_avis';
      $ess=mysql_result($sql,0);
  $smarty-&gt;assign('contact', $ess);
      }
  </code></pre>
  
  <p>Here is the code put in the product.tpl file:</p>
  
  <pre><code>&lt;li&gt;test :{$contact}&lt;/li&gt;
  </code></pre>
  
  <p>Here's the mistake it gives:</p>
  
  <p><a href="https://i.stack.imgur.com/ONRFh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ONRFh.png" alt="Error message"></a></p>
  
  <p>Could one of you save me and explain where the problem comes from please?</p>
  
  <p>I thank you in advance.</p>