doctorbill
asked on
php loops
These are my sql queries:
-------------------------- ------
mysql_select_db($database_ egweb, $egweb);
$query_egweb = "SELECT * FROM eg_images";
$egweb = mysql_query($query_egweb, $egweb) or die(mysql_error());
$row_egweb = mysql_fetch_assoc($egweb);
$totalRows_egweb = mysql_num_rows($egweb);
$totalRows_egwebb = mysql_num_rows($egweb);
-------------------------- -------
This is in the body tag:
<?php do { ?>
<a class='highslide' href='<?php echo $row_egweb['eg_lge']; ?>' title="<?php echo $row_egweb['eg_title']; ?>"
onclick="return hs.expand(this, miniGalleryOptions1)">
<img src='<?php echo $row_egweb['eg_thumb']; ?>' alt=''/></a>
<?php } while ($row_egweb = mysql_fetch_assoc($egweb)) ; ?>
What I need to do is to get th Do loop to start showing images from the table row with an ID of > 4. As it stands at the moment, the code is working but is duplicating the first image
Can anyone help please ?
--------------------------
mysql_select_db($database_
$query_egweb = "SELECT * FROM eg_images";
$egweb = mysql_query($query_egweb, $egweb) or die(mysql_error());
$row_egweb = mysql_fetch_assoc($egweb);
$totalRows_egweb = mysql_num_rows($egweb);
$totalRows_egwebb = mysql_num_rows($egweb);
--------------------------
This is in the body tag:
<?php do { ?>
<a class='highslide' href='<?php echo $row_egweb['eg_lge']; ?>' title="<?php echo $row_egweb['eg_title']; ?>"
onclick="return hs.expand(this, miniGalleryOptions1)">
<img src='<?php echo $row_egweb['eg_thumb']; ?>' alt=''/></a>
<?php } while ($row_egweb = mysql_fetch_assoc($egweb))
What I need to do is to get th Do loop to start showing images from the table row with an ID of > 4. As it stands at the moment, the code is working but is duplicating the first image
Can anyone help please ?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I think you have not read this line:
What I need to do is to get the Do loop to start showing images from the table row with an ID of > 4.
What I need to do is to get the Do loop to start showing images from the table row with an ID of > 4.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Comment to Ray:
I am very glad that someone with your experience recomends the sitepoint php book - I purchased this a few weeks ago but have not got round to reading it yet. I will do so
I am very glad that someone with your experience recomends the sitepoint php book - I purchased this a few weeks ago but have not got round to reading it yet. I will do so
ASKER
All solutions had their merits and , combined, solved my problem
Open in new window