hi, ich will die ausgegebenen Datensätze von 1 bis n nummerieren. leider funzt das mit der "for()" Anweisung nicht so wie ich mir das vorstelle. ich häng mal die Abfrage ran, vielleicht hat jemand ne Idee.
danke
bepage
Code:
$result = mysql_query("SELECT id, url, link FROM image WHERE link LIKE 'web' ORDER BY id");
$gesamt = mysql_num_rows($result);
while($row = mysql_fetch_array($result)) {
for ($i=1; $i<=$gesamt; $i++) {
echo "<table class=\"investeck\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>";
echo "<td width=\"5\" height=\"50\" align=\"center\">". $i . "</td><br>";
echo "<td width=\"90\" height=\"72\" align=\"center\">"."<a href=\"javascript:;\" onClick=\"MM_openBrWindow('popup.php?go=".$row['id']," & bg=".$row['link'],"','1','width=320,height=370')\">"."<img border=\"0\" src=../test/images/".$row['link'] ."/".$row['url']."></a></td>";
echo "<td width=\"40\" height=\"72\" align=\"left\">". $row['link'] . "<br></td>";
echo "</tr></table>";
}
exit;}
danke
bepage
Code:
$result = mysql_query("SELECT id, url, link FROM image WHERE link LIKE 'web' ORDER BY id");
$gesamt = mysql_num_rows($result);
while($row = mysql_fetch_array($result)) {
for ($i=1; $i<=$gesamt; $i++) {
echo "<table class=\"investeck\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>";
echo "<td width=\"5\" height=\"50\" align=\"center\">". $i . "</td><br>";
echo "<td width=\"90\" height=\"72\" align=\"center\">"."<a href=\"javascript:;\" onClick=\"MM_openBrWindow('popup.php?go=".$row['id']," & bg=".$row['link'],"','1','width=320,height=370')\">"."<img border=\"0\" src=../test/images/".$row['link'] ."/".$row['url']."></a></td>";
echo "<td width=\"40\" height=\"72\" align=\"left\">". $row['link'] . "<br></td>";
echo "</tr></table>";
}
exit;}
Kommentar