WCM - Das österreichische Computer Magazin Forenübersicht
 

Zurück   WCM Forum > Rat & Tat > Programmierung

Programmierung Rat & Tat für Programmierer

Microsoft KARRIERECAMPUS

 
 
Themen-Optionen Ansicht
Alt 27.10.2003, 14:52   #2
dub
Veteran
 
Registriert seit: 28.01.2003
Alter: 41
Beiträge: 321


dub eine Nachricht über ICQ schicken
Standard

PHP-Code:
function get_list($weight 2$section_id 0$section_dir "") {
global 
$tbl_name;
global 
$now_datetime;
global 
$page_postdate;
global 
$page_list;

$query "SELECT ID, title, post_date, summary FROM $tbl_name 
WHERE status = 1
AND post_date <= '$now_datetime' 
AND weight <= '$weight'
AND section_id = '$section_id'
AND ( expire_date > '$now_datetime' OR expire_date = '')
ORDER BY post_date DESC
"
;
$result mysql_query($query); 
$string "";
while (
$row mysql_fetch_object($result)) {
$title stripslashes($row->title);
$page_postdate $row->post_date
$id $row->ID;
$summary $row->summary;
// Set date format for list
$page_postdate format_datelong($page_postdate); 
$string $string 
[b]<a href=\""
;
if (
$section_dir != "") { 
$string $string 
$section_dir "/";
}
$string $string "item.php?id=" 
$id "\">" $title " </a>" 
"[/b]
 \n"
;
}
$page_list $string "";

Die Änderung im Detail:

PHP-Code:
$query "SELECT ID, title, post_date, summary FROM $tbl_name WHERE status = 1 AND post_date <= '$now_datetime' AND weight <= '$weight' AND section_id = '$section_id' AND ( expire_date > '$now_datetime' OR expire_date = '') ORDER BY post_date DESC"
PHP-Code:
while ($row mysql_fetch_object($result)) {
   
$title stripslashes($row->title);
   
$page_postdate $row->post_date
   
$id $row->ID;
   
$summary $row->summary
#Hannes#
dub ist offline   Mit Zitat antworten
 


Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 
Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.

Gehe zu


Alle Zeitangaben in WEZ +2. Es ist jetzt 11:39 Uhr.


Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Forum SEO by Zoints
© 2009 FSL Verlag