The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
i downloaded a blog system from hotscripts got it all set up and then when i come to use it this comes up!
Does anyone know how i can fix this?
i have uploaded it to
http://www.wehey.com/blog/
> I suggest you get one that works!
wow, what a suggestion :)
Or make your own, they're not ~that~ hard to make. I managed it if that's anything to go by...
stick the following line in after the mysql_query line:
echo mysql_error();
And see what it says, if anything.
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home2/andy28/public_html/blog/newzadmin.php on line 118
What good is it going to do you looking at the contents of basiknewz.php when the problem is in newzadmin.php?
Post the contents of the correct file and I might help you if I'm feeling nice ;-)
i think it means that it is not a recognised string or something
$num = mysql_numrows($basikSQL);
... needs to be ...
$num = mysql_num_rows($basikSQL);
require "newzconfig.php";
include("newzcode.php");
?>
echo "";
?>
@mysql_connect($db_host,$db_user,$db_pass) or die("Couldn't Connect to Database"); @mysql_select_db($db_name) or die("Couldn't Select Database"); $pagelimit = "$newsperpage"; $basikSQL = mysql_query("SELECT * FROM $table"); $totalrows = mysql_num_rows($basikSQL); $pagenums = ceil ($totalrows/$pagelimit); if ($page==''){ $page='1'; } $start = ($page-1) * $pagelimit; $starting_no = $start + 1; if ($totalrows - $start < $pagelimit) { $end_count = $totalrows; } elseif ($totalrows - $start >= $pagelimit) { $end_count = $start + $pagelimit; } if ($totalrows - $end_count > $pagelimit) { $var2 = $pagelimit; } elseif ($totalrows - $end_count <= $pagelimit) { $var2 = $totalrows - $end_count; } $space = " "; $basikSQL = mysql_query("SELECT * FROM $table ORDER BY dbdate DESC, id DESC LIMIT $start,$pagelimit"); $num=mysql_numrows($basikSQL); mysql_close(); $i=0; while ($i < $num) { $newstitle=mysql_result($basikSQL,$i,"newstitle"); $dbdate=mysql_result($basikSQL,$i,"dbdate"); $newsdate=mysql_result($basikSQL,$i,"newsdate"); $news=mysql_result($basikSQL,$i,"news"); $news = BBCode($news); echo "
"; ++$i; } if(mysql_num_rows($basikSQL) == 0) { echo "There are currently no newz articles in the database!"; } if ($page>1) { echo "« Prev" . $space . $pagelimit . " Articles" . $space . $space . ""; } for ($i=1; $i<=$pagenums; $i++) { if ($i!=$page) { echo " < a href= '{$_SERVER['PHP_SELF']}?page=$i'>$i "; } else { echo " $i"; } } if ($page<$pagenums) { echo "" . $space . $space . $space . $space . " Next " . $var2 . " Articles »"; } ?> Newz Admin | Powered by BasikNewz (v3.0) |