missing a connect verification

This commit is contained in:
luis daniel lucio quiroz
2014-06-21 05:22:45 +00:00
parent 926d170960
commit 3f0f7ab1a5

View File

@@ -346,6 +346,11 @@ include "root.php";
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);
if ($prep_statement) {
$prep_statement->execute();