RE: [PHP] Looping through a Db query result twice in PEAR
| From: | Warren Vail | Date: | Wed, 24 May 2006 20:47:44 +0000 |
| Subject: | RE: [PHP] Looping through a Db query result twice in PEAR | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-236850@lists.php.net to get a copy of this message | ||
Shouldn't it be;
$sql="Some query";
$result = $conn->query($sql);
// VVVVV VVVVVVV
while ($row = $conn->fetchArray($result)) {
echo $row['hey'];
}
// VVVVV VVVVVVV
while ($row2 = $conn->fetchArray($result)) {
echo $row2['otherhey'];
}
Warren Vail