-
ليش البرنامج مابشتغل
قمت بتعديل الـ while وأضفت الـ post و pagetext في جملة الـ select
<?
// The number of posts you want to see
$count = 5;
// url to the forum
$forum_url = 'http://localhost/vb/';
require("admin/config.php");
$db=mysql_connect($servername,$dbusername,$dbpassword);
mysql_select_db($dbname);
$db_conn = mysql_connect( $dbserver, $dbuser, $dbpass );
$result = mysql_db_query($dbname, "SELECT post.pagetext AS pagetext,thread.threadid AS id,thread.title AS title,thread.replycount AS replycount,thread.forumid AS forumid,forum.title AS forumtitle FROM post,thread,forum WHERE forum.forumid = thread.forumid ORDER BY thread.lastpost DESC LIMIT $count" , $db_conn);
while (($thread == mysql_fetch_array($result)) AND ($post == mysql_fetch_array($result))) {
$text = $thread["title"] . " : " . $thread["threadindex"] . $post["pagetext"];
$text = strip_tags(substr( $text, 0, 51 ));
echo $text . " <a href='".$forum_url."showthread.php?threadid=".$thread["id"]."'>التفاصيل</a><br>";
}
mysql_close( $db_conn );
?>
وجزاكم الله خيراً
ضوابط المشاركة
- لا تستطيع إضافة مواضيع جديدة
- لا تستطيع الرد على المواضيع
- لا تستطيع إرفاق ملفات
- لا تستطيع تعديل مشاركاتك
-
قوانين المنتدى
أضف موقعك هنا |
اضافة محتوى فريد لموقعك