Hallo,
ich habe dies hier shconmal in einen aderen Forum gepostet aber die sind alle irgentwie komisch drauf.
ch arbeite für www.do-design.de und wir sind grade an der Kategorie FrreeDesigns.
(Inmoment wird sie nur in Firefox richtig angezeigt.)
http://www.do-design.de/?page=freedesigns&ard=Ilch
Meine frage ist ob man dies hier irgentwie kürzer schreiben kann (Die MySQL ausgabe)
Inmoment lege ich ja immer nur neu $i fest.
MfG
Der Code:
Darauf Wurde mir dies geantwortet:
mysql_fetch_assoc : Liefert einen Datensatz als assoziatives Array
Ich hab mirr dazu schon Tutorials angeschaut abr ich habe es noch nicht hinbekommen.
ich habe dies hier shconmal in einen aderen Forum gepostet aber die sind alle irgentwie komisch drauf.
ch arbeite für www.do-design.de und wir sind grade an der Kategorie FrreeDesigns.
(Inmoment wird sie nur in Firefox richtig angezeigt.)
http://www.do-design.de/?page=freedesigns&ard=Ilch
Meine frage ist ob man dies hier irgentwie kürzer schreiben kann (Die MySQL ausgabe)
Inmoment lege ich ja immer nur neu $i fest.
MfG
Der Code:
PHP:
<?
$ard = $_GET[ard];
if ("$ard") {
?>
<?
include("includes/configs/cfg.inc.php");
$db = mysql_connect($dbhost,$dbuser, $dbpw);
$sqlab = "select * from do_freedesigns ";
$sqlab .= " where rubrik = '$ard' ";
$res = mysql_db_query("$dbdb", $sqlab);
$num = mysql_num_rows($res);
if ($num==0) echo "<div align='center'> keine passenden Datensaetze gefunden <br></div>";
echo "<div align='center'>";
// Tabellenbeginn
echo "<table border='0' bordercolor='000000' width='$includeboxbreite'><tr> <td>";
//__________________________________________________________________________
echo "<div align='center'><table $designfreeTAB><tr>";
echo "<td $designfreeTABbox>";
$i = "0";
echo "<div align='center'>";
$name = mysql_result($res, $i, "name");
$tumb = mysql_result($res, $i, "minibild");
$normal = mysql_result($res, $i, "bigbild");
$rubrik = mysql_result($res, $i, "rubrik");
$download = mysql_result($res, $i, "download");
//_____
echo "<table $designfreeTABboxin>";
echo "<tr><td $designfreeTABboxtds>Name: $name <br></td></tr>";
echo "<tr><td $designfreeTABboxtds><a href=includes/images/freedesigns/normal/$normal.jpg rel='lightbox' title='$name'><img src='includes/images/freedesigns/tumb/$tumb.jpg' $designfreeTABboxpic ></a></td></tr>";
echo "<tr><td $designfreeTABboxtds>Download: <a href='includes/downloads/freedesigns/$download.zip'>hier klicken</a></td></tr>";
echo "<tr><td $designfreeTABboxtds>Demo: <a href='http://ilch-demo.do-design.de/'>hier klicken</a></td></tr>";
echo "</table>";
//_____
echo "</div>";
echo "</td>";
echo "<td $designfreeTABbox>";
$i = "0";
echo "<div align='center'>";
$name = mysql_result($res, $i, "name");
$tumb = mysql_result($res, $i, "minibild");
$normal = mysql_result($res, $i, "bigbild");
$rubrik = mysql_result($res, $i, "rubrik");
$download = mysql_result($res, $i, "download");
//_____
echo "<table $designfreeTABboxin>";
echo "<tr><td $designfreeTABboxtds>Name: $name <br></td></tr>";
echo "<tr><td $designfreeTABboxtds><a href=includes/images/freedesigns/normal/$normal.jpg rel='lightbox' title='$name'><img src='includes/images/freedesigns/tumb/$tumb.jpg' $designfreeTABboxpic ></a></td></tr>";
echo "<tr><td $designfreeTABboxtds>Download: <a href='includes/downloads/freedesigns/$download.zip'>hier klicken</a></td></tr>";
echo "<tr><td $designfreeTABboxtds>Demo: <a href='http://ilch-demo.do-design.de/'>hier klicken</a></td></tr>";
echo "</table>";
//_____
echo "</div>";
echo "</td>";
echo "<td $designfreeTABbox>";
$i = "0";
echo "<div align='center'>";
$name = mysql_result($res, $i, "name");
$tumb = mysql_result($res, $i, "minibild");
$normal = mysql_result($res, $i, "bigbild");
$rubrik = mysql_result($res, $i, "rubrik");
$download = mysql_result($res, $i, "download");
//_____
echo "<table $designfreeTABboxin>";
echo "<tr><td $designfreeTABboxtds>Name: $name <br></td></tr>";
echo "<tr><td $designfreeTABboxtds><a href=includes/images/freedesigns/normal/$normal.jpg rel='lightbox' title='$name'><img src='includes/images/freedesigns/tumb/$tumb.jpg' $designfreeTABboxpic ></a></td></tr>";
echo "<tr><td $designfreeTABboxtds>Download: <a href='includes/downloads/freedesigns/$download.zip'>hier klicken</a></td></tr>";
echo "<tr><td $designfreeTABboxtds>Demo: <a href='http://ilch-demo.do-design.de/'>hier klicken</a></td></tr>";
echo "</table>";
//_____
echo "</div>";
echo "</td>";
echo "</tr><tr>";
echo "<td $designfreeTABbox>";
$i = "0";
echo "<div align='center'>";
$name = mysql_result($res, $i, "name");
$tumb = mysql_result($res, $i, "minibild");
$normal = mysql_result($res, $i, "bigbild");
$rubrik = mysql_result($res, $i, "rubrik");
$download = mysql_result($res, $i, "download");
//_____
echo "<table $designfreeTABboxin>";
echo "<tr><td $designfreeTABboxtds>Name: $name <br></td></tr>";
echo "<tr><td $designfreeTABboxtds><a href=includes/images/freedesigns/normal/$normal.jpg rel='lightbox' title='$name'><img src='includes/images/freedesigns/tumb/$tumb.jpg' $designfreeTABboxpic ></a></td></tr>";
echo "<tr><td $designfreeTABboxtds>Download: <a href='includes/downloads/freedesigns/$download.zip'>hier klicken</a></td></tr>";
echo "<tr><td $designfreeTABboxtds>Demo: <a href='http://ilch-demo.do-design.de/'>hier klicken</a></td></tr>";
echo "</table>";
//_____
echo "</div>";
echo "</td>";
echo "<td $designfreeTABbox>";
$i = "0";
echo "<div align='center'>";
$name = mysql_result($res, $i, "name");
$tumb = mysql_result($res, $i, "minibild");
$normal = mysql_result($res, $i, "bigbild");
$rubrik = mysql_result($res, $i, "rubrik");
$download = mysql_result($res, $i, "download");
//_____
echo "<table $designfreeTABboxin>";
echo "<tr><td $designfreeTABboxtds>Name: $name <br></td></tr>";
echo "<tr><td $designfreeTABboxtds><a href=includes/images/freedesigns/normal/$normal.jpg rel='lightbox' title='$name'><img src='includes/images/freedesigns/tumb/$tumb.jpg' $designfreeTABboxpic ></a></td></tr>";
echo "<tr><td $designfreeTABboxtds>Download: <a href='includes/downloads/freedesigns/$download.zip'>hier klicken</a></td></tr>";
echo "<tr><td $designfreeTABboxtds>Demo: <a href='http://ilch-demo.do-design.de/'>hier klicken</a></td></tr>";
echo "</table>";
//_____
echo "</div>";
echo "</td>";
echo "<td $designfreeTABbox>";
$i = "0";
echo "<div align='center'>";
$name = mysql_result($res, $i, "name");
$tumb = mysql_result($res, $i, "minibild");
$normal = mysql_result($res, $i, "bigbild");
$rubrik = mysql_result($res, $i, "rubrik");
$download = mysql_result($res, $i, "download");
//_____
echo "<table $designfreeTABboxin>";
echo "<tr><td $designfreeTABboxtds>Name: $name <br></td></tr>";
echo "<tr><td $designfreeTABboxtds><a href=includes/images/freedesigns/normal/$normal.jpg rel='lightbox' title='$name'><img src='includes/images/freedesigns/tumb/$tumb.jpg' $designfreeTABboxpic ></a></td></tr>";
echo "<tr><td $designfreeTABboxtds>Download: <a href='includes/downloads/freedesigns/$download.zip'>hier klicken</a></td></tr>";
echo "<tr><td $designfreeTABboxtds>Demo: <a href='http://ilch-demo.do-design.de/'>hier klicken</a></td></tr>";
echo "</table>";
//_____
echo "</div>";
echo "</td>";
echo "</div>";
echo "</tr></table></div>";
//__________________________________________________________________________
echo "</td> </tr></table>";
echo "</div>";
?>
<?
}
else {
?>
<a href="?page=freedesigns&ard=Ilch">Ilch</a>
<?
}
?>
Darauf Wurde mir dies geantwortet:
mysql_fetch_assoc : Liefert einen Datensatz als assoziatives Array
Ich hab mirr dazu schon Tutorials angeschaut abr ich habe es noch nicht hinbekommen.