mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-24 12:52:19 +09:00
r7619 추가 count(*) 쿼리에 query_id 주석 포함
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7683 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
60ced4cc19
commit
8595952528
9 changed files with 14 additions and 0 deletions
|
|
@ -879,6 +879,7 @@
|
|||
$count_query = sprintf("select count(*) as \"count\" from %s %s %s", implode(',',$table_list),implode(' ',$left_join), $condition);
|
||||
$total_count = $this->getCountCache($output->tables, $condition);
|
||||
if($total_count === false) {
|
||||
$count_query .= (__DEBUG_QUERY__&1 && $output->query_id)?sprintf(' '.$this->comment_syntax,$this->query_id . ' count(*)'):'';
|
||||
$result = $this->_query($count_query);
|
||||
$count_output = $this->_fetch($result);
|
||||
$total_count = (int)$count_output->count;
|
||||
|
|
|
|||
|
|
@ -924,6 +924,7 @@
|
|||
$count_query = sprintf("select count(*) as \"count\" from %s %s %s", implode(',',$table_list),implode(' ',$left_join), $condition);
|
||||
$total_count = $this->getCountCache($output->tables, $condition);
|
||||
if($total_count === false) {
|
||||
$count_query .= (__DEBUG_QUERY__&1 && $output->query_id)?sprintf(' '.$this->comment_syntax,$this->query_id . ' count(*)'):'';
|
||||
$result = $this->_query($count_query);
|
||||
$count_output = $this->_fetch($result);
|
||||
if(!$this->transaction_started) @ibase_commit($this->fd);
|
||||
|
|
|
|||
|
|
@ -746,6 +746,8 @@
|
|||
if (count($output->groups)) $count_query = sprintf('select count(*) as count from (%s) xet', $count_query);
|
||||
|
||||
$param = $this->param;
|
||||
|
||||
$count_query .= (__DEBUG_QUERY__&1 && $output->query_id)?sprintf(' '.$this->comment_syntax,$this->query_id . ' count(*)'):'';
|
||||
$result = $this->_query($count_query);
|
||||
|
||||
$this->param = $param;
|
||||
|
|
|
|||
|
|
@ -609,6 +609,8 @@
|
|||
$count_query = sprintf("select count(*) as count from %s %s %s", implode(', ', $table_list), implode(' ', $left_join), $count_condition);
|
||||
if (count($output->groups))
|
||||
$count_query = sprintf('select count(*) as count from (%s) xet', $count_query);
|
||||
|
||||
$count_query .= (__DEBUG_QUERY__&1 && $output->query_id)?sprintf(' '.$this->comment_syntax,$this->query_id . ' count(*)'):'';
|
||||
$result = $this->_query($count_query);
|
||||
$count_output = $this->_fetch($result);
|
||||
$total_count = (int)$count_output->count;
|
||||
|
|
|
|||
|
|
@ -620,6 +620,8 @@
|
|||
$count_query = sprintf("select count(*) as count from %s %s %s", implode(', ', $table_list), implode(' ', $left_join), $count_condition);
|
||||
if (count($output->groups))
|
||||
$count_query = sprintf('select count(*) as count from (%s) xet', $count_query);
|
||||
|
||||
$count_query .= (__DEBUG_QUERY__&1 && $output->query_id)?sprintf(' '.$this->comment_syntax,$this->query_id . ' count(*)'):'';
|
||||
$result = $this->_query($count_query);
|
||||
$count_output = $this->_fetch($result);
|
||||
$total_count = (int)$count_output->count;
|
||||
|
|
|
|||
|
|
@ -598,6 +598,8 @@
|
|||
$count_query = sprintf("select count(*) as count from %s %s %s", implode(', ', $table_list), implode(' ', $left_join), $count_condition);
|
||||
if (count($output->groups))
|
||||
$count_query = sprintf('select count(*) as count from (%s) xet', $count_query);
|
||||
|
||||
$count_query .= (__DEBUG_QUERY__&1 && $output->query_id)?sprintf(' '.$this->comment_syntax,$this->query_id . ' count(*)'):'';
|
||||
$result = $this->_query($count_query);
|
||||
$count_output = $this->_fetch($result);
|
||||
$total_count = (int)$count_output->count;
|
||||
|
|
|
|||
|
|
@ -809,6 +809,8 @@ class DBPostgresql extends DB
|
|||
implode(' ', $left_join), $condition);
|
||||
$total_count = $this->getCountCache($output->tables, $condition);
|
||||
if ($total_count === false) {
|
||||
|
||||
$count_query .= (__DEBUG_QUERY__&1 && $output->query_id)?sprintf(' '.$this->comment_syntax,$this->query_id . ' count(*)'):'';
|
||||
$result = $this->_query($count_query);
|
||||
$count_output = $this->_fetch($result);
|
||||
$total_count = (int)$count_output->count;
|
||||
|
|
|
|||
|
|
@ -641,6 +641,7 @@
|
|||
$total_count = $this->getCountCache($output->tables, $condition);
|
||||
|
||||
if($total_count === false) {
|
||||
$count_query .= (__DEBUG_QUERY__&1 && $output->query_id)?sprintf(' '.$this->comment_syntax,$this->query_id . ' count(*)'):'';
|
||||
$result = $this->_query($count_query);
|
||||
$count_output = $this->_fetch($result);
|
||||
$total_count = (int)$count_output->count;
|
||||
|
|
|
|||
|
|
@ -681,6 +681,7 @@
|
|||
$count_query = sprintf("select count(*) as count from %s %s %s", implode(',',$table_list),implode(' ',$left_join), $condition);
|
||||
$total_count = $this->getCountCache($output->tables, $condition);
|
||||
if($total_count === false) {
|
||||
$count_query .= (__DEBUG_QUERY__&1 && $output->query_id)?sprintf(' '.$this->comment_syntax,$this->query_id . ' count(*)'):'';
|
||||
$this->_prepare($count_query);
|
||||
$count_output = $this->_execute();
|
||||
$total_count = (int)$count_output->count;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue