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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.