fix: polykame SQL chyby a pliveme je zpatky s pridanym dotazem.
This commit is contained in:
parent
093c6127fa
commit
0d4bdf1a19
|
@ -226,9 +226,17 @@ class rows
|
|||
public function execute(query $Q)
|
||||
{
|
||||
$this->log[] = $Q;
|
||||
|
||||
$stmt = $this->pdo->prepare($Q->sql);
|
||||
$stmt->execute($Q->params);
|
||||
|
||||
try {
|
||||
$stmt = $this->pdo->prepare($Q->sql);
|
||||
$stmt->execute($Q->params);
|
||||
} catch (\PDOException $exception) {
|
||||
// TODO - toto elegantněji
|
||||
throw new usageException(
|
||||
$exception->getMessage() . ' : ' . PHP_EOL .
|
||||
$Q->interpolate()
|
||||
);
|
||||
}
|
||||
|
||||
return $stmt;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue