Hello Every one, im in a need for some help
i have the following issue :
--- Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in D:\Hosting\00000\html\index.php on line 10
this is what the code looks like
Can some one please assist me on what is wrong with it thanks much.
$sql = mysql_query("SELECT * FROM forum_posts WHERE type='a' ORDER BY date_time DESC LIMIT 0, 30");
$topicsBody = "";
while($row = mysql_fetch_array($sql)){
$id = $row["id"];
$post_author = $row["post_author"];
$post_author_id = $row["post_author_id"];
$thread_author = $row["thread_author"];
$original_thread_id = $row["original_thread_id"];
$date_time = $row["date_time"];
$date_time = strftime("%a %b %d, %Y %I:%M:%S %p", strtotime($date_time));
$type = $row["type"];
$view_count = $row["view_count"];
$category = $row["category"];
$category = substr('' . $category . '', 0, 15);
$cat_ref_num = $row["cat_ref_num"];
$title = stripslashes($row["title"]);
$title = htmlentities($title);
$title = substr('' . $title . '', 0, 48);