DeeCoo
06.02.2007, 14:52
Snippet ermöglnicht Dir die Ausgabe der Anzahl Deiner Produkte in jedem Template.
{php }
$res = xtc_db_query("SHOW TABLE STATUS LIKE 'products';");
$row = mysql_fetch_array($res, MYSQL_ASSOC);
echo '<font size =\"1\">Anzahl Produkte: ' . $row['Rows'] . '</font>';
{/php}
kann auch erweitert werden, wenn man z.B. das Datum der letzten Aktualisierung anzeigen lassen will ... dann mit
echo '<font size =\"1\">Letztes Update: ' . $row['Update_time'] . '</font>';
ergänzen.
Das ganze sieht dann so aus:
{php }
$res = xtc_db_query("SHOW TABLE STATUS LIKE 'products';");
$row = mysql_fetch_array($res, MYSQL_ASSOC);
echo '<font size =\"1\">Anzahl Produkte: ' . $row['Rows'] . '</font>
';
echo '<font size =\"1\">Letztes Update: ' . $row['Update_time'] . '</font>';
{/php}
HF , Gruss DeeCoo
{php }
$res = xtc_db_query("SHOW TABLE STATUS LIKE 'products';");
$row = mysql_fetch_array($res, MYSQL_ASSOC);
echo '<font size =\"1\">Anzahl Produkte: ' . $row['Rows'] . '</font>';
{/php}
kann auch erweitert werden, wenn man z.B. das Datum der letzten Aktualisierung anzeigen lassen will ... dann mit
echo '<font size =\"1\">Letztes Update: ' . $row['Update_time'] . '</font>';
ergänzen.
Das ganze sieht dann so aus:
{php }
$res = xtc_db_query("SHOW TABLE STATUS LIKE 'products';");
$row = mysql_fetch_array($res, MYSQL_ASSOC);
echo '<font size =\"1\">Anzahl Produkte: ' . $row['Rows'] . '</font>
';
echo '<font size =\"1\">Letztes Update: ' . $row['Update_time'] . '</font>';
{/php}
HF , Gruss DeeCoo