I am trying to get posts from my mybb database, and then display it in the homepage. I wish to sort it by newest thread first, however when I attempt it it fails with this message:
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/ interitu/public_html/index.php
Code used:
<?php
$con = mysql_connect("","","");
// I HAVE REMOVED THE CONNECTION DETAILS FOR DATABASE SECURITY
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("interitu_forums", $con);
$result = mysql_query("SELECT * FROM mybb_posts ORDER BY tid ASC WHERE fid='4' LIMIT
5");
while($row = mysql_fetch_array($result))
{
And the code goes on to stuff not relevant (HTML content).