Jump to content

Help with mysql_fetch_assoc....


rhyno

Recommended Posts

I need to have the entire result set returned... However mysql_fetch_array() does not return all the row in the DB...  ???

	mysql_select_db($database_chry7248, $chry7248);
$query_rsImages = "SELECT tblimages.filelocation, tblimages.`description`, tblimages.dogfk, tblimages.width, tblimages.height FROM tblimages, tbldogs WHERE tblimages.dogfk = tbldogs.dog_id AND tbldogs.dog_id = ".$_GET['dogID']."";
$rsImages = mysql_query($query_rsImages, $chry7248) or die(mysql_error());
$row_rsImages = mysql_fetch_assoc($rsImages);
$totalRows_rsImages = mysql_num_rows($rsImages);

is the first block of code called... then I have...

while ($row = mysql_fetch_assoc($rsImages)) { 
			echo '<div align="center"><img class="pic" src="'.$row['filelocation'].'" alt="'.$row['description'].'" width="'.$row['width'].'" height="'.$row['height'].'"/></div>';

		}

else where on the page... I know I am using different names in the two examples and that it is considered bad form.

Can you help me out with this? Please... If it is in the wrong forum I apologize.

Link to comment
https://forums.phpfreaks.com/topic/90541-help-with-mysql_fetch_assoc/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.