Communauté Informatique NDFR.net : Systeme de news avec le phpbb - Programmation Web (HTML, PHP, ASP, Java, XML, etc.)
 
Systeme de news avec le phpbb
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 17-10-2004, 21:41
Magi-X's Avatar
Magi-X Magi-X is offline
Modérateur
1 Highscore
 
Join Date: 31-10-2002
Location: Bruxelles
Age: 41
Posts: 816
Send a message via MSN to Magi-X
voila, comme promis je te donne mon code que j'ai fais a l'époque

PHP Code:
// take the last topic in the news room -> id = 2                
$sql_get_news mysql_query("SELECT * FROM mov_topics WHERE forum_id = 2 ORDER BY topic_time DESC LIMIT 1");
$get_news mysql_fetch_array($sql_get_news);
                    
// get the nr of replies
$sql_get_replies mysql_query("SELECT topic_replies FROM mov_topics WHERE topic_id = ".$get_news['topic_id']);
$get_replies mysql_fetch_array($sql_get_replies);
                    
// get to poster who made the topic
$sql_get_poster mysql_query("SELECT username FROM mov_users WHERE "$get_news['topic_poster'] ." = user_id");
$get_poster mysql_fetch_array($sql_get_poster);
                    
// get to body of the topic
$sql_get_body mysql_query("SELECT * 
                    FROM     mov_posts, 
                        mov_posts_text 
                    WHERE 
                        mov_posts.topic_id = "
$get_news['topic_id'] ."
                    AND
                        mov_posts.poster_id = "
$get_news['topic_poster'] ."
                    AND
                        mov_posts_text.post_id = mov_posts.post_id
                    ORDER BY 
                        mov_posts.topic_id ASC LIMIT 10"
);
$get_body mysql_fetch_array($sql_get_body); 
il faudra naturellement changer les paramettres en fonction de ta config.
Reply With Quote
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cours de français Benjy Discussions sur le site et/ou le forum 47 01-05-2006 14:47
Présentation de Windows Longhorn Build 4051 (PDC03) Werner Articles 155 22-12-2005 00:29
Premiers pas sous Linux Fred Articles 19 21-10-2003 05:46
Restauration du système avec un ghost ! Mala Windows NT4/2000/XP Client 4 09-03-2003 17:15
Paramétrer et configurer les services de Windows XP Werner Articles 0 16-10-2002 19:07

All times are GMT +2. The time now is 08:22.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.