954,587 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

I NEED HELP PLEASE:Warning: mysql_num_rows():


<? } ?>


<? require('templates/ad_header.php'); ?>


<?
}//function

//showing header
function show_header(){
?>

Demo Site
<?
$mode=form_get("mode");
$act=form_get("act");
if($mode=="user"){
?>

<?
}
elseif(($mode=='listing')&&($act=='create')){
?>

<?
}
elseif((($mode=='listing')&&($act!='create')&&($act!='show')&&($act!='feedback'))||(($mode=='search')&&($act=='listing'))){
?>

<?
}//elseif
?>


<? require('templates/header.php'); ?>


<?
}
//showing footer
function show_footer(){
?>


<? require("templates/footer.php"); ?>

welbyobeng
Junior Poster in Training
75 posts since Oct 2006
Reputation Points: 13
Solved Threads: 0
 

Looks like you're in a different scope block, so PHP doesn't "know" about your connection ID there.

The format of your post is excellent. Thanks for taking the extra time to make it so.

Puckdropper
Posting Pro
500 posts since Jul 2004
Reputation Points: 23
Solved Threads: 23
 

Just another note. If that doesn't help and it doesn't seem to be that way with you. The FIRST thing that should always be looked at with that particular error, is the QUERY that you are trying to get the number of rows from the result. More often than not the query failed on you and now mysql_num_rows() is trying to parse a result that is not a table so it can't count the rows.

That's always soemthing to watch out for.

DGStudios
Light Poster
31 posts since Mar 2006
Reputation Points: 10
Solved Threads: 3
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You