mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-19 18:32:52 +09:00
click count for all database types
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6827 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
314700badd
commit
1004aebd05
7 changed files with 70 additions and 0 deletions
|
|
@ -675,6 +675,8 @@ class DBPostgresql extends DB
|
|||
foreach ($output->columns as $key => $val) {
|
||||
$name = $val['name'];
|
||||
$alias = $val['alias'];
|
||||
if($val['click_count']) $click_count[] = $val['name'];
|
||||
|
||||
if (substr($name, -1) == '*') {
|
||||
$column_list[] = $name;
|
||||
} elseif (strpos($name, '.') === false && strpos($name, '(') === false) {
|
||||
|
|
@ -758,6 +760,15 @@ class DBPostgresql extends DB
|
|||
$result = $this->_query($query);
|
||||
if ($this->isError())
|
||||
return;
|
||||
|
||||
if(count($click_count)>0 && count($output->conditions)>0){
|
||||
$_query = '';
|
||||
foreach($click_count as $k => $c) $_query .= sprintf(',%s=%s+1 ',$c,$c);
|
||||
$_query = sprintf('update %s set %s %s',implode(',',$table_list), substr($_query,1), $condition);
|
||||
$this->_query($_query);
|
||||
}
|
||||
|
||||
|
||||
$data = $this->_fetch($result);
|
||||
|
||||
$buff = new Object();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue