having pics list horizantally rather then vertically
Posted: Mon Aug 12, 2002 11:12 pm
Hi all! I must first note that I know absolutly NOTHING about how php gets around, I's almost a total mystery to me. Having said that I asked a guy to write code for food one day, The point of this script is to list all of the pictures associated with a field. It displays horizantally, were as I get 5 images up and down...this sucks
I need the images to go from left to right, preferably in 2 rows (3 on top and 2 on bottom) Now for my question
WHERE (@#$%) is this being specified in this code??? (And now to annoy the moderator) how do I fix it??
<?
//don't run query unless id>0 This is a fix to an earlier problem I had
if($iID>0)
{
$sWhere =" WHERE id='$iID'";
$sSQL = "SELECT * FROM boat_list $sWhere ";
$rsResult = mysql_query($sSQL) or die("Query failed");
if ($rsLine = mysql_fetch_array($rsResult, MYSQL_ASSOC)) {
$iOwnerID = $rsLine["boat_owner_contact_id"];
$sSQL = "SELECT filename FROM boat_picture_matrix WHERE boat_list_id='".$rsLine["id"]."'";
$rsImages = mysql_query($sSQL) or die("Query failed");
while($rsImage=mysql_fetch_array($rsImages, MYSQL_ASSOC)){
$sImage.="<a href=\"images/upload/".$rsImage["filename"]."_large.jpg\" target=_blank><img src=\"images/upload/".$rsImage["filename"].".jpg\"></a><br>";
}
mysql_free_result($rsImages);
?>
okay so $rsImage Is the var that controlls this so it's safe to assume that the line $sSQL = $rsImage (some of you are saying "no s#$% Sherlock) boat_picture_matrix is the table the images draw from, I still can't see where placement params might go.
Thanks!
WHERE (@#$%) is this being specified in this code??? (And now to annoy the moderator) how do I fix it??
<?
//don't run query unless id>0 This is a fix to an earlier problem I had
if($iID>0)
{
$sWhere =" WHERE id='$iID'";
$sSQL = "SELECT * FROM boat_list $sWhere ";
$rsResult = mysql_query($sSQL) or die("Query failed");
if ($rsLine = mysql_fetch_array($rsResult, MYSQL_ASSOC)) {
$iOwnerID = $rsLine["boat_owner_contact_id"];
$sSQL = "SELECT filename FROM boat_picture_matrix WHERE boat_list_id='".$rsLine["id"]."'";
$rsImages = mysql_query($sSQL) or die("Query failed");
while($rsImage=mysql_fetch_array($rsImages, MYSQL_ASSOC)){
$sImage.="<a href=\"images/upload/".$rsImage["filename"]."_large.jpg\" target=_blank><img src=\"images/upload/".$rsImage["filename"].".jpg\"></a><br>";
}
mysql_free_result($rsImages);
?>
okay so $rsImage Is the var that controlls this so it's safe to assume that the line $sSQL = $rsImage (some of you are saying "no s#$% Sherlock) boat_picture_matrix is the table the images draw from, I still can't see where placement params might go.
Thanks!