You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Amal,
There is a Listener.php in the app/common/extension directory, so you can attach it to Events Manager:
$eventsManager = new \Phalcon\Events\Manager();
$eventsManager->attach('db', new \Baseapp\Extension\Listener());
$this->db->setEventsManager($eventsManager);
and run some query to debug:
$query = $this->db->convertBoundParams('SELECT * FROM `users` WHERE `user_id` = :user_id:', array(':user_id' => 1));
$user = $this->db->fetchAll($query['sql'], \Phalcon\Db::FETCH_ASSOC, $query['params']);
or you can add it in the Bootstrap if the env is development:
Hello,
I wanted to request you to add the facility to log SQL statements in your framework. See this:
https://docs.phalconphp.com/en/latest/reference/models.html#logging-low-level-sql-statements
I have this in my Base App based config.ini
Or we can use just
Debug
&DBLog
.Kindly also provide
Debugging
boolean for code. We can place ourechos, var_dump, \Phalcon\Debug\Dump
calls inif (enableDebugging) { ...
Thanks
Amal
The text was updated successfully, but these errors were encountered: