public function execute($query) {
$dbname='../../db.sqlite';
$base= new PDO('sqlite:'.$dbname.'');
$preparedStatement = $base->prepare($query);
$i=0;
while($tmp = $preparedStatement->fetch(PDO::FETCH_ASSOC)) {
$array[$i] = $tmp;
$i++;
}
return $array;
}
No comments:
Post a Comment