public function getDbLogs() { if (DEBUG) { $logs = R::getDatabaseAdapter() ->getDatabase() ->getLogger(); $logs = array_merge($logs->grep( 'SELECT' ), $logs->grep( 'select' ), $logs->grep( 'INSERT' ), $logs->grep( 'UPDATE' ), $logs->grep( 'DELETE' )); echo $logs; } }
RedBean method for retrieving logs from the database connection
Approved. Code works!
This is exactly the working code that is verified by the moderator or site administrators
Tested: PHP 7
More
lil-code© | 2022 - 2024
Go Top