Update database.php

This commit is contained in:
FusionPBX
2016-11-19 11:57:36 -07:00
committed by GitHub
parent 03180c9018
commit 1b06ed31d5

View File

@@ -351,14 +351,14 @@ include "root.php";
// Use this function to execute complex queries
public function execute(){
$sql = $this->sql;
//echo $sql;
//connect to the database if needed
if (!$this->db) {
$this->connect();
}
//get data from the database
$prep_statement = $this->db->prepare($sql);
$prep_statement = $this->db->prepare($this->sql);
if ($prep_statement) {
$prep_statement->execute();
return $prep_statement->fetchAll(PDO::FETCH_ASSOC);