mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-08-28 06:01:11 -05:00
Improve error handling in prepared statements
This commit is contained in:
@@ -35,7 +35,10 @@ class PSDatabase {
|
||||
$this->connect();
|
||||
if ($params) {
|
||||
$stmt = $this->db->prepare($query);
|
||||
$stmt->execute($params);
|
||||
$execution_result = $stmt->execute($params);
|
||||
if (!$execution_result) {
|
||||
return null;
|
||||
}
|
||||
return $stmt;
|
||||
} else {
|
||||
return $this->db->query($query);
|
||||
|
||||
Reference in New Issue
Block a user