displaying sql returns
Posted: Sun Oct 17, 2004 6:05 pm
feyd | Help us, help you. Please use
this is opens my database to get the image names and then the display block displays it when i echo it in the html but i dont want to returns all the images in a single collum going down i would like to do the return with a row of 4 and then the next 4 below that and so on.
feyd | Help us, help you. Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]Code: Select all
$sql = "SELECT image
FROM $table_name
ORDER BY image ";
$result = @mysql_query($sql,$connection)
or die("Couldn't execute query.");
while ($row = mysql_fetch_array($result)) {
$image_name = $row['image'];
$display_block .= "
<img border='1' src='$image_name' width='135' height='100'>
<p>
";
}feyd | Help us, help you. Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]