GetDotted Domains

Viewing Thread:
"mysql_num_rows"

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.

Sun 28/09/03 at 15:41
Regular
"^^^New Online Arcad"
Posts: 1,369
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home2/andy28/public_html/blog/newzadmin.php on line 118

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/
Thu 02/10/03 at 21:39
Regular
"It goes so quickly"
Posts: 4,083
phi11ip wrote:
> I suggest you get one that works!

wow, what a suggestion :)
Wed 01/10/03 at 14:44
Regular
"Eff, you see, kay?"
Posts: 14,156
Have you considered MovableType?
Wed 01/10/03 at 10:05
Regular
"Chavez, just hush.."
Posts: 11,080
I suggest you get one that works!

Or make your own, they're not ~that~ hard to make. I managed it if that's anything to go by...
Mon 29/09/03 at 22:39
Regular
"Eff, you see, kay?"
Posts: 14,156
I suggest you read the install instructions properly.
Mon 29/09/03 at 21:10
Regular
"AlL fLo$$Ed OuT"
Posts: 173
Though having just run your page, I can see 3 other errors now. The first line it talks about is $totalrows = mysql_num_rows($basikSQL);

stick the following line in after the mysql_query line:

echo mysql_error();

And see what it says, if anything.
Mon 29/09/03 at 21:04
Regular
"AlL fLo$$Ed OuT"
Posts: 173
I'm glad to see you all pay good attention to error messages...

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 ;-)
Mon 29/09/03 at 19:51
Regular
"whoneedsatagline?"
Posts: 194
Maybe its because you've done a mysql_close() before trying to get the mysql_num_rows result? Dunno, but its a thought.
Sun 28/09/03 at 19:39
Regular
"^^^New Online Arcad"
Posts: 1,369
tried that...didnt work!

i think it means that it is not a recognised string or something
Sun 28/09/03 at 18:46
Regular
"It goes so quickly"
Posts: 4,083
I expect its because you're missing an underscore '_'.

$num = mysql_numrows($basikSQL);

... needs to be ...

$num = mysql_num_rows($basikSQL);
Sun 28/09/03 at 16:12
Regular
"^^^New Online Arcad"
Posts: 1,369
here is what it says in basiknewz.php :

require "newzconfig.php";
include("newzcode.php");
?>


<?php echo "$title"; ?>
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 "








$newstitle
[$newsdate]
$news


";
++$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)





Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Many thanks!
You were 100% right - great support!
Excellent
Excellent communication, polite and courteous staff - I was dealt with professionally. 10/10

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.