Citefy-Landing_page/Models/QueriesModel.php
//Function to execute a PDO statement and return the data
Function to execute a PDO statement and return the data
Function to execute a PDO statement and return the data
public function pdoStatement($sql, $data=array()) {
        $statement = $this->db->prepare( $sql );
        try{
            $statement->execute( $data );
        } catch (Exception $e){
            echo "<p>Exception: $e</p>";
        }
        return $statement;
    }
public function pdoStatement ( $ sql , $ data = array ( ) ) { $ statement = $ this -> db -> prepare ( $ sql ) ; try { $ statement -> execute ( $ data ) ; } catch ( Exception $ e ) { echo " <p>Exception:  $ e </p> " ; } return $ statement ; }
Function to execute a PDO statement and return the data
Function to execute a PDO statement and return the data