diff --git a/dblayer.php b/dblayer.php index f82270e..3db25cd 100644 --- a/dblayer.php +++ b/dblayer.php @@ -776,6 +776,17 @@ class dblayer extends PDO return $this->db->exec($sql); } + /** This function permit to send a SQL request to the database to do a SELECT + Return the an array with the datas */ + public function directRead ($sql) + { + $st = $this->db->prepare ($sql); + $st->execute (); + $res = array (); + while ($d = $st->fetch (PDO::FETCH_ASSOC)) + $res[] = $d; + return $res; + } } /** POC :