hallo,
die Abfrage funktioniert soweit,
habe nur immer problem die ausgabe in eine tabelle zu packen mit z.b. 3 spalten.
kann mir da jemand helfen?
<?php
if (!defined("mxMainFileLoaded")) die ("You can't access this file directly...");
$module_name = basename(dirname(__FILE__));
#mxGetLangfile($module_name);
$index = 1;
$foto_query = "SELECT MAX( date ) , typ, anzahl,aid
FROM `${prefix}_avatar`
GROUP BY date DESC LIMIT 0,30";
$result = sql_query($foto_query);
$limit = sql_num_rows($result);
include("header.php");
OpenTable();
// Listen wir das Zeug auf:
for ($i=0; $i < $limit; $i++) {
list($date,$typ,$anzahl, $aid) = sql_fetch_row($result);
$av_end = explode("|",$typ);
echo "<a href=\"modules.php?name=Userinfo&uname=$aid\"><img src='".MX_PATH_MEMBERAVATAR."/".$av_end[$anzahl-1]."' alt=\"$aid\" border=\"0\" alt=\"\" width=\"100\" /></a><br>";
}
CloseTable();
include ("footer.php");
?>
hat hier keiner eine idee wie ich die ausgabe ansehnlicher bekomme
oder mir hier die abfrage vom geschlecht einbauen...dann hätten wir ja bei der ausgabe 2 spalten
3-spaltig zum ausprobieren :
<?php
if (!defined("mxMainFileLoaded")) die ("You can't access this file directly...");
$module_name = basename(dirname(__FILE__));
#mxGetLangfile($module_name);
$index = 1;
$foto_query = "SELECT MAX(date),typ,anzahl,aid FROM ${prefix}_avatar GROUP BY date DESC LIMIT 0,30";
$result = sql_query($foto_query);
$limit = sql_num_rows($result);
include("header.php");
OpenTable();
// Listen wir das Zeug auf:
echo "<table width=\"100%\"><tr>\n";
$colcounter=1;
while (list($date,$typ,$anzahl, $aid) = sql_fetch_row($result));
{
$av_end = explode("|",$typ);
echo "<td><a href=\"modules.php?name=Userinfo&uname=$aid\"><img src='".MX_PATH_MEMBERAVATAR."/".$av_end[$anzahl-1]."' alt=\"$aid\" border=\"0\" alt=\"\" width=\"100\" /></a></td>";
if (floor($colcounter/3)==1)
{
echo "</tr><tr>\n";
$colcounter=0;
}
$colcounter++;
}
echo "</tr></table>\n";
CloseTable();
include ("footer.php");
?>
MfG
jubilee
hi,
danke das du dran gearbeitet hast :thumbup:
leider kommt nicht das gewünschte raus
http://www.gecealem.de/modules.php?name=New-Pic
Was sagt der debug-mode ??
Notice: Undefined offset: -1 in /home/g/gecealem.de/public_html/modules/New-Pic/index.php on line 19
Zitatwhile (list($date,$typ,$anzahl, $aid) = sql_fetch_row($result));
ändern in
Zitatwhile (list($date,$typ,$anzahl, $aid) = sql_fetch_array($result));
Hmmm ....
Eigentlich sollte das ja mit sql_fetch_row gehen und nicht mit fetch_array
Bist Du sicher, das auch wirklich etwas aus der Datenbank kommt ??
immer noch das gleiche
Notice: Undefined offset: -1 in /home/g/gecealem.de/public_html/modules/New-Pic/index.php on line 19
so sieht es aus wie es ganz oben steht und die daten stimmen auch
http://www.gecealem.de/modules.php?name=New-Pic2
Ahhhhhhhhhh
Wie blöd von mir .....
Erstmal das mit dem sql_fetch_array wieder in sql_fetch_row zurückändern und dann --->
Zitatwhile (list($date,$typ,$anzahl, $aid) = sql_fetch_row($result));
das blöde ; hinter dieser Zeile wegmachen ......
super funktioniert
http://www.gecealem.de/modules.php?name=New-Pic