Sorry for the questions there is more, is there a standard way of debugging sql queries so it automatically gets the stack as it happens. I currently have to put this at the end of the action method

$profiler = $this->db->getProfiler();
foreach($profiler->getQueryProfiles() as $profile)
       {
           echo $profile->getQuery().'<br><br>';
       }

Dan Rossi wrote:
By the way which is the best efficient way to build queries. Using table dataobjects which alrteady has join / field information. The select class or a prepared statements. Im not sure how to use a prepared statement though.

Dan Rossi wrote:
Sorry about all these questions, the docs are very inconsistent at times, IE a pointer will be shown but it doesnt show how it gets called first.

I'm looking at the db table docs, althought its confusing how to automatically generate dataobjects for each of the tables aswell as generate table relationships from INNODB foreign keys. Is there a way to do this and easily manipulate data inside the table and join other tables etc.

I currently use PEAR's DB_DataObject but am interested in PDO for performance reasons.

My other question is when an exception happens it redirects to /error however I have no idea how to handle errors as yet , or how to extract the messages in the error controller any ideas ?

Basically i'd like to be able to have a custom handler and also log to a file via email and file in production mode. But then also display the stack and the message in debug mode.

Let me know.



Reply via email to