$s = $this->db->prepare('SELECT * FROM table'); $s->execute(); if($pl =$s->fetch()){ } $s->closeCursor(); $s->execute(); foreach($s->fetchAll() as $all){ foreach($all as $war){ } } $s->closeCursor();
$s = $this->db->prepare('SELECT * FROM table'); $s->execute(); if($pl =$s->fetch()){ } $s->closeCursor(); $s->execute(); foreach($s->fetchAll() as $all){ foreach($all as $war){ } } $s->closeCursor();
$s = $this->db->prepare('SELECT * FROM table'); $s->execute();
if($pl =$s->fetch()){ }
foreach($s->fetchAll() as $all){ foreach($all as $war){ } }