Seit zwei Tagen "pfusche" ich herum, aber ich krieg's nicht hin:
Ich möchte auf meiner Startseiten die 5 letzten Artikel aus meiner gesamten DB (nicht aus einer best. Kategorie!) im Layout von "Snoppy's Artikelliste" haben, also mit automat. generiertem Thumbnail, etc....
Für die aktuellsten Artikel verwende ich folgendes Modul (funktioniert auch in 4.4.4 bestens!):
Kein Input:
Output:
Wer kann mir diese Abfrage in http://contenido.de/forum/viewtopic.php?t=3209 integrieren????<?php
$sql = "SELECT cat_art.idcatart, cat_lang.idcat, cat_lang.name, art_lang.idart, art_lang.title,
DATE_FORMAT(art_lang.lastmodified, '%d.%m.%Y') AS last_modified
FROM ".$cfg["tab"]["art_lang"]." art_lang, ".$cfg["tab"]["cat_art"]." cat_art, con_cat_lang cat_lang, con_cat cat
WHERE cat_lang.idcat = cat_art.idcat AND cat_art.idart = art_lang.idart AND
cat.idcat = cat_lang.idcat AND cat.idclient = '$client' AND
art_lang.online = '1' AND cat_lang.visible = '1' AND cat_art.is_start = '0' ORDER BY art_lang.lastmodified DESC LIMIT 0,5";
$db->query($sql); // execute query
//echo '<table border="0" cellspacing="0" cellpadding="0">',chr(10);
echo ' <tr>',chr(10);
//echo ' <td class="rahmen" rowspan="2">',chr(10);
//if ("CMS_IMG[41]" != "")
//{
// echo ' <img border="0" src="CMS_IMG[41]" align="absmiddle" width="50" height="50">';
//}
//echo "CMS_IMGDESCR[41]</td>",chr(10);
// echo ' <img border="0" src="images/gadget_aktuell.jpg" align="absmiddle" width="50" height="50"></td>',chr(10);
echo ' <td><h4>Neue Artikel</h4><p></td>',chr(10);
echo ' </tr>',chr(10);
echo ' <tr>',chr(10);
echo ' <td class="textleft">',chr(10);
while ($db->next_record())
{
$link = $sess->url("front_content.php?idcatart=" . $db->f("idcatart") . "&lang=$lang&client=$client");
echo ' <a href="'.$link.'">'.$db->f("title").'</a><br>('.$db->f("last_modified").')<p>',chr(10);
} // end while
echo ' </td>',chr(10);
echo ' </tr>',chr(10);
//echo '</table>',chr(10);
?>
Danke!
hubert