Hello Im getting this error
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\Dynamic [PHP WEBSITE]\includes\main_content.php on line 15
Anyone fix this code..
Here is my code
<?php
include("includes/connect.php");
$select_posts = "select * from prodcut order by rand() LIMIT 0,4";
$run_posts = mysql_query($select_posts);
while($row=mysql_fetch_array($run_posts)){ /* This is LINE no. 15*/
$post_id = $row['pid'];
$post_name = $row['name'];
$post_image = $row['image'];
$post_details = substr($row['details'],0,200);
?>
Here is screenshot of code..
http://i.imgur.com/Ca1cCWS.png
Screenshot of database table http://img546.imageshack.us/img546/699/8ler.png
Remember: im only want to show ID, name, image and details of every post on my website.