0 steave ray posted how to print sql query in prestashop $sql = new DbQuery(); $sql->select('c.`passwd`'); $sql->from('customer', 'c'); $sql->where('c.`email` = \'' . pSQL($email) . '\''); How can I view the SQL query on Smarty , in other word , how to print sql query in prestashop ? Edit Question
1 debugger answered Aug 9 '21 00:00 __toString() Generate and get the query. $sql = new DbQuery(); $sql->select('c.`passwd`'); $sql->from('customer', 'c'); $sql->where('c.`email` = \'' . pSQL($email) . '\'') echo $sql->__toString(); it will print like this for example : SELECT c.`passwd` FROM `rtn_customer` c WHERE (c.`email` = 'infores@gmail.com') __toString() is used to convert sql object query to string . Edit Answer