خرید بک لینک
سلام وقتتون بخیر باشه من این کد رو دارم
<?php 

include("includes/coect.php");

$select_posts = "select * from posts order by rand () LIMIT 10";

$run_posts = mysql_query($select_posts);

while($row=mysql_fetch_array($run_posts)){

$post_id = $row['post_id'];
$post_title = $row['post_title'];
$post_date = $row['post_date'];
$post_author = $row['post_author'];
$post_image = $row['post_image'];
$post_content = substr($row['post_content'],0,200);



?>

این دستور PHP هست که برای دریافت اطلاعات من به کار بردم (از جایی برداشتم)
بعد من این ORDER BY rand() رو وقتی میکنم by id یا by DESC یا order by ASC این ارور رو بهم میده

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in D:xampphtdocsmalalaindex.php on line 10

بعد میرم خط ده چک میکنم می بینم
while($row=mysql_fetch_array($run_posts)){


میبینم هیچی نیز چز این که خط قبلیشم اینه

<?php

include("includes/coect.php");

$select_posts = "select * from posts order by id LIMIT 10";

$run_posts = mysql_query($select_posts);

می خواستم ببینم استادید محترم کسی میدونه دلیلش چیه ؟

با تشکر :قلب:

برچسب: نویسنده: خنج تاريخ: يکشنبه 25 تير 1396 ساعت: 21:09

صفحه بندی