note 120242 deleted from pdostatement.fetchall by sobak
| From: | sobak@php.net | Date: | Wed, 30 Nov 2016 14:48:39 +0000 |
| Subject: | note 120242 deleted from pdostatement.fetchall by sobak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-207752@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
I use a method like this to return all the data
public function RecuperarAutos(){
$res = ConectarBD::GetConeccion();
$res->prepare("select * from autos");
$res->excecute();
$autos=array();
foreach ($res->fetch as $row) {
$x = Auto::ConstDesdeBd($row);
array_push($autos, $x);
}
}