|
|
@ -367,7 +367,9 @@ class OC_DB { |
|
|
|
|
|
|
|
|
|
|
|
// Optimize the query |
|
|
|
// Optimize the query |
|
|
|
$query = self::processQuery( $query ); |
|
|
|
$query = self::processQuery( $query ); |
|
|
|
|
|
|
|
if(defined('LOG_QUERIES') && LOG_QUERIES === true) { |
|
|
|
|
|
|
|
OC_Log::write('core', 'DB prepare : '.$query, OC_Log::DEBUG); |
|
|
|
|
|
|
|
} |
|
|
|
self::connect(); |
|
|
|
self::connect(); |
|
|
|
// return the result |
|
|
|
// return the result |
|
|
|
if(self::$backend==self::BACKEND_MDB2) { |
|
|
|
if(self::$backend==self::BACKEND_MDB2) { |
|
|
@ -952,6 +954,10 @@ class PDOStatementWrapper{ |
|
|
|
* make execute return the result instead of a bool |
|
|
|
* make execute return the result instead of a bool |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function execute($input=array()) { |
|
|
|
public function execute($input=array()) { |
|
|
|
|
|
|
|
if(defined('LOG_QUERIES') && LOG_QUERIES === true) { |
|
|
|
|
|
|
|
$params_str = str_replace("\n"," ",var_export($input,true)); |
|
|
|
|
|
|
|
OC_Log::write('core', 'DB execute with arguments : '.$params_str, OC_Log::DEBUG); |
|
|
|
|
|
|
|
} |
|
|
|
$this->lastArguments = $input; |
|
|
|
$this->lastArguments = $input; |
|
|
|
if (count($input) > 0) { |
|
|
|
if (count($input) > 0) { |
|
|
|
|
|
|
|
|
|
|
|