From ac67c9ed806eaa26c619e4eaf53a84112c405a81 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 14 Nov 2012 14:23:00 +0000 Subject: [PATCH] log sql by setting $this->debug = true, before calling so_sql::search() --- etemplate/inc/class.so_sql.inc.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etemplate/inc/class.so_sql.inc.php b/etemplate/inc/class.so_sql.inc.php index 218c22facc..7a09d8927d 100644 --- a/etemplate/inc/class.so_sql.inc.php +++ b/etemplate/inc/class.so_sql.inc.php @@ -1033,6 +1033,7 @@ class so_sql } } $rs = $this->db->union($union,__LINE__,__FILE__,$order_by,$start,$num_rows); + if ($this->debug) error_log(__METHOD__."() ".$this->db->Query_ID->sql); $cols = $union_cols; $union = $union_cols = array(); @@ -1056,6 +1057,7 @@ class so_sql } $rs = $this->db->select($this->table_name,$mysql_calc_rows.$colums,$query,__LINE__,__FILE__, $start,$order_by,$this->app,$num_rows,$join); + if ($this->debug) error_log(__METHOD__."() ".$this->db->Query_ID->sql); $cols = $this->_get_columns($only_keys,$extra_cols); } if ((int) $this->debug >= 4) echo "

sql='{$this->db->Query_ID->sql}'

\n";