Subversion Repositories oidplus

Compare Revisions

Regard whitespace Rev 1451 → Rev 1450

/trunk/plugins/viathinksoft/database/odbc/OIDplusDatabaseConnectionODBC.class.php
59,11 → 59,6
}
 
/**
* @var array
*/
private $prepare_cache = [];
 
/**
* @param string $sql
* @param array|null $prepared_args
* @return OIDplusQueryResultODBC
85,13 → 80,7
}
unset($value);
 
if (isset($this->prepare_cache[$sql])) {
$ps = $this->prepare_cache[$sql];
} else {
$ps = @odbc_prepare($this->conn, $sql);
if (!$ps) $ps = false; // because null will result in isset()=false
$this->prepare_cache[$sql] = $ps;
}
if (!$ps) {
// If preparation fails, try the emulation
// For example, SQL Server ODBC Driver cannot have "?" in a subquery,
106,7 → 95,7
 
if (!@odbc_execute($ps, $prepared_args)) {
$this->last_error = odbc_errormsg($this->conn);
throw new OIDplusSQLException($sql.' mit Args '.print_r($prepared_args,true), $this->error());
throw new OIDplusSQLException($sql, $this->error());
}
return new OIDplusQueryResultODBC($ps);
}