Only add PDO::PGSQL_ATTR_DISABLE_PREPARES for versions of PHP that support it.
This commit is contained in:
parent
e4884fa4b1
commit
98b19d1f22
|
|
@ -1130,7 +1130,12 @@ include "root.php";
|
|||
}
|
||||
|
||||
//set the error mode
|
||||
$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION, PDO::PGSQL_ATTR_DISABLE_PREPARES);
|
||||
$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
||||
//reduce prepared statement latency
|
||||
if (defined('PDO::PGSQL_ATTR_DISABLE_PREPARES') {
|
||||
$this->db->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES);
|
||||
}
|
||||
|
||||
//execute the query, and return the results
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue