mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 23:03:25 +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
|
|
@ -544,6 +544,8 @@
|
|||
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) {
|
||||
|
|
@ -590,6 +592,14 @@
|
|||
|
||||
$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