What is the equivalent of these two code in PDO
first:
$row=mysql_fetch_array($query);
second:
while($row=mysql_fetch_array($query)){
$data[]=$row;
}
i used these codes below but they are not exact same i guess, because the rest of the code didn't work.
$row = $query->fetch(PDO::FETCH_NUM);
and
$data[] = $query->fetch(PDO::FETCH_ASSOC);
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…