Added ability to pass an array of datas in PDO::sql_query()
This commit is contained in:
parent
8c40a86ea0
commit
165ded7cac
@ -227,7 +227,7 @@ class mypdo extends Database
|
||||
* @return result renvoie un pointeur de resultat ou faux si erreur de requete
|
||||
*/
|
||||
|
||||
function sql_query($query = "", $transaction = FALSE)
|
||||
function sql_query($query = "", $data=false, $transaction = FALSE)
|
||||
{
|
||||
$query=Database::rewriteQuery($query);
|
||||
//echo $query."<br>";
|
||||
@ -240,7 +240,10 @@ class mypdo extends Database
|
||||
// $this->query_result = $this->db_connect->query($query);
|
||||
|
||||
$this->query_result = $this->db_connect->prepare($query);
|
||||
$this->query_result->execute();
|
||||
if( !$data )
|
||||
$this->query_result->execute();
|
||||
else
|
||||
$this->query_result->execute($data);
|
||||
}
|
||||
if(isset($this->query_result))
|
||||
// if (!$this->query_result = $this->db_connect->query($query))
|
||||
|
Loading…
x
Reference in New Issue
Block a user