title: Prestashop 1.6.1.14 - Database Query Returns 1 on Execute
body: <p>I am currently using the code below in Prestashop to retrieve a cart id.</p>
  
  <pre><code>    public function hookDisplayPDFInvoice($params) {
  
      $order_invoice = $params['object'];
      $id_order = (int)$order_invoice-&gt;id_order;
  
      $sql = 'SELECT id_cart FROM '._DB_PREFIX_.'orders WHERE id_order="'.$id_order.'"';
      //example id_cart
      $id_cart = Db::getInstance()-&gt;execute($sql);
      return $id_cart;
  </code></pre>
  
  <p>In database, there are id_cart and id_timeslot. Table is called ps_cart_timeslot.</p>
  
  <p>I am quite stuck as I am baffled as to why the data return is 1 for any data I am retrieving.</p>
  
  <p>$id_order is fine, it is returning the right value. Any data select I am querying will return 1.</p>
  
  <p>Am I missing anything? Pardon me if this is a silly mistake.</p>
  
  <p>Thank you.</p>