Hi there. Before i'm starting i want to say "sorry" for bad english. I'm only a 17 year old pupil from germany ;-)
ok, I have a mySQL Database and inside text with pictures-links like c:\pic\pic.jpg ... and i want to print them out, 3 pictures in a line, maybe in a table... I'm not completly sure if the post before mine is asking exactly this problem...
The Problem is: in the Database sometime i have only 2 entrys, or 10 entrys. So i need a code that fetch the rows AND the cols and show the pictures.
Can somebody help me, please ?
Here's the code i've just written:
<?php
include("connect.php");
$query = "SELECT
modellstamm.mods_artbez,
modellstamm.mods_inv_preis,
modellstamm.bgross,
modellstamm.bklein
FROM
modellstamm
WHERE
modellstamm.mods_schnitt='1070'";
$result = mysql_query($query,$db);
if( !$result )
{
die("Falscher Datensatz !!!");
}
$nrows = mysql_num_rows($result);
$row = 0;
$span1 = 50;
$span2 = 20;
while( $row < $nrows )
{
$mods_artbez = mysql_result($result,$row,"mods_artbez");
$mods_inv_preis = mysql_result($result,$row,"mods_inv_preis");
$bklein = mysql_result($result,$row,"bklein");
?>
<a href="Picture-Test"
<img src="<?php echo $bklein; ?>" border=0 name="cart" alt="<?php echo $mods_artbez; ?>"></a>
<?php
$row++;
}
mysql_free_result($result);
mysql_close();
?>
SebHoff