Index: trunk/core/kernel/db/db_connection.php =================================================================== diff -u -N -r3834 -r3999 --- trunk/core/kernel/db/db_connection.php (.../db_connection.php) (revision 3834) +++ trunk/core/kernel/db/db_connection.php (.../db_connection.php) (revision 3999) @@ -68,6 +68,13 @@ var $debugMode=false; /** + * Last query to database + * + * @var string + */ + var $lastQuery = ''; + + /** * Initializes connection class with * db type to used in future * @@ -332,6 +339,7 @@ */ function Query($sql,$key_field = null) { + $this->lastQuery = $sql; if($this->debugMode) return $this->debugQuery($sql,$key_field); $query_func = $this->getMetaFunction('query'); $this->queryID = $query_func($sql,$this->connectionID);