ActiveRecord Debugging Library |
[eluser]Phil Sturgeon[/eluser]
I recently wrote an article on how to debug your ActiveRecord queries but I think it could be even easier. Here is a rough protoype for a VERY simple debugging library that will help output ANY ActiveRecord query. Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Theoretically (untested) you could run any of your normal commands such as get, getwhere, update, select, etc through $this->db_debug->get(); then it would work fine. For example: Code: $this->db->set('something', $variable); All of these will be logged in the CodeIgniter logs too. Totally untested, just looking for feedback. |
Messages In This Thread |
ActiveRecord Debugging Library - by El Forum - 06-01-2009, 05:48 AM
ActiveRecord Debugging Library - by El Forum - 06-01-2009, 05:53 AM
ActiveRecord Debugging Library - by El Forum - 06-01-2009, 07:07 AM
ActiveRecord Debugging Library - by El Forum - 06-01-2009, 07:18 AM
ActiveRecord Debugging Library - by El Forum - 06-01-2009, 08:02 AM
ActiveRecord Debugging Library - by El Forum - 06-01-2009, 08:41 AM
ActiveRecord Debugging Library - by El Forum - 06-01-2009, 08:48 AM
ActiveRecord Debugging Library - by El Forum - 06-01-2009, 12:41 PM
ActiveRecord Debugging Library - by El Forum - 06-01-2009, 12:42 PM
ActiveRecord Debugging Library - by El Forum - 06-01-2009, 12:45 PM
ActiveRecord Debugging Library - by El Forum - 06-01-2009, 03:02 PM
ActiveRecord Debugging Library - by El Forum - 06-05-2009, 07:56 PM
ActiveRecord Debugging Library - by El Forum - 06-06-2009, 03:37 AM
|