Re: Only 4 of 5...
| From: | John Nichel | Date: | Fri, 03 Mar 2006 01:30:47 +0000 |
| Subject: | Re: Only 4 of 5... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-231391@lists.php.net to get a copy of this message | ||
Gustav Wiberg wrote:
Hi there! What's wrong here?? <?php ... open db... $sql = "SELECT IDPic, picNameSmall FROM tbpics"; $querys = mysql_query($sql); $dbArray = mysql_fetch_array($querys);You're pulling the first row here
if (intval($frmIDModel)>0) { ?> <b>Visa telefonbilder för <?php echo $dbModelName;?>:</b><br> <?php } else if (intval($frmIDManufacturer)>0) { $dbNameManufacturer = $dbArray["nameManufacturer"]; ?> <b>Visa telefonbilder för <?php echo $dbNameManufacturer;?>:</b><br> <?php } else { ?> <b>Alla telefonbilder i arkivet:</b><br> <?phpSo now there are only 4 rows left when you loop thru them here.
while ($dbArray = mysql_fetch_array($querys)) {
$dbIDPic = $dbArray["IDPic"];
$dbPicNameSmall = $dbArray["picNameSmall"];
?>
<img src="phonepics/<?php echo $idModel;?>_<?php echo $dbPicNameSmall;?>" alt="testbild från mobil" border="1" width="120" height="130">
<?php
}
}
?>
I have 5 posts in the table, but the images shown are only four! Why?
/G
--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com