۱۳۹۱/۸/۱۳، ۲۲:۱۷:۵۸ عصر
این همه پست داده شد اما هنمز مشکل کسانی که با این ارور مواجهند برطرف نشد :
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/vadodico/public_html/Portal/wp-content/themes/cms2/post/last.php on line 36
یعنی شک نکنید اطلاعات دیتابیس درسته.خودتون بررسی کنید :
نام و یوزر دیتابیس یکیه و حرف اول Forum تو آدرس انجمنم F بزرگه و حتی بخشی از جدول هم نمایش داده می شه ولی پست ها نمایش داده نمیشه.اینم از لینکش http://iranpigeons.ir/Portal/wp-content/...t/last.php
خواهشا مشکلمو حل کنید نگید اطلاعات دیتابیس مشکل داره
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/vadodico/public_html/Portal/wp-content/themes/cms2/post/last.php on line 36
یعنی شک نکنید اطلاعات دیتابیس درسته.خودتون بررسی کنید :
کد:
<?php
//web alfa
// ver 1.0
echo '
<html xmlns="http://www.w3.org/1999/xhtml" dir="rtl" lang="fa-IR">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="FB.css" rel="stylesheet" type="text/css" media="screen">
<div id="MTForumBlock">
<table id="webalfa-lastpost">
<tr class="MTForumfirst">
<td class="MTForumtitle">عنوان</td>
<td class="MTForumanswer">پاسخ</td>
<td class="MTForumview">بازديد</td>
<td class="MTForumlast">توسط</td>
</tr>';
## CUSTOMIZE SETTINGS FOR YOUR SITE ##
$db_host = "localhost"; // Change this if your MySQL database host is different.
$db_name = "vadodico_***"; // Change this to the name of your database.
$db_user = "vadodico_***"; // Change this to your database username.
$db_pw = "***"; // Change this to your database password.
$db_pre = "mybb_"; // Tables prefix
$forum_url = "http://iranpigeons.ir/Forum/"; // Change this to reflect to your forum's URL.
$limit = "5"; // Number of posts displayed.
$txtlimit = "100"; // This is the character limit.
#######################################
// Connecting to your database
mysql_connect($db_host, $db_user, $db_pw );
mysql_select_db($db_name);
mysql_query("SET NAMES utf8");
$thread_sql = mysql_query("SELECT tid,subject,lastposter,replies,views FROM ".$db_pre."threads order by lastpost DESC LIMIT $limit");
while($thread_get=mysql_fetch_array($thread_sql))
{
$replycount = $thread_get['replies'];
$views = $thread_get['views'];
$threadid = $thread_get['tid'];
$poster = $thread_get['lastposter'];
$title = $thread_get['subject'];
if(strlen($title) > ($txtlimit-4)){
$title = substr($title,0,$txtlimit).'...';
}
echo "
<tr>
<td class=\"MTForumrowtitle\"><a href=\"".$forum_url."/showthread.php?tid=$threadid\"><img src=\"FBarrow.gif\" border=\"0\"> $title</a></td>
<td class=\"MTForumanswer\">$replycount</td>
<td class=\"MTForumview\">$views</td>
<td class=\"MTForumlast\">$poster</td>
</tr>";
}
echo " </tr>
</table>
</div>
";
?>
نام و یوزر دیتابیس یکیه و حرف اول Forum تو آدرس انجمنم F بزرگه و حتی بخشی از جدول هم نمایش داده می شه ولی پست ها نمایش داده نمیشه.اینم از لینکش http://iranpigeons.ir/Portal/wp-content/...t/last.php
خواهشا مشکلمو حل کنید نگید اطلاعات دیتابیس مشکل داره