MrBaseball34 Posted August 23, 2010 Share Posted August 23, 2010 I'm writing a new class for Prestashop.I have some simple db access code in my current that looks like this: Class Database { function query($query){ $result = mysql_query($query); if($this->debug_mode) { echo mysql_error(); } return $result; } } And using it in my code: $db = new Database; $sql = 'SELECT * FROM TABLE' $result = $db->query($sql); if($result) { while($row = mysql_fetch_row($result)) // iterate and do something with row data } } How would I convert this to Prestashop "speak" using the Db class?There is not going to be a template used here, only class code. This classis to generate PDF files from database data so I do not need any presentation.I already have everything, I just wanted to use PS classes to do it all. Link to comment Share on other sites More sharing options...
Patric Posted August 23, 2010 Share Posted August 23, 2010 According to the forum rules, please post in the good sections. Topic closed.Please read the forum rules. Link to comment Share on other sites More sharing options...
Recommended Posts