Below is a piece of code i,ve configured with, It's giving me an
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/****/public_html/****/g.php on line 265. The information stored in the database can accessed be accessed by other pages, using the same code. but its not possible to read database info in "g.php". The problem reports in g.php only.. There is no problem found when i use g.php in the http://localhost , but it araises when I upload it to my website for testing.. Please comment and help me to tacle this problem out..

The screen shot is attached along with this..

if (isset($_GET['PostID'])) {
## Check if board exists
    $getpost = mysql_query("SELECT Title, Timestamp, Body, PostCat1, PostCat2, PostCat3, PostCat4, Author FROM posts WHERE
        PostID='".$_GET['PostID']."' AND Draft=0");
    if (mysql_num_rows($getpost) == 0) {
        $pagetitle =& $language['404'];
        include ('template/header.htm');
        include ('template/404.htm');
		include ('template/footer.htm');
		echo '</div><div id="sidebar">
		<h1>Other Posts..........</h1>				
				<ul class="sidemenu">';
		showfooter();
        exit();
    }
## If the script didn't EXIT(), show the board for the post
    $postcontents = mysql_fetch_array($getpost);
    $pagetitle =& $postcontents['Title'];
    $get_author = mysql_query("SELECT DispName, Bio FROM ".USERS_TBL." WHERE UserID='".$postcontents['Author']."'");
    $author = mysql_fetch_array($get_author);

Please read this thread. Most likely there is an error in your sql statement.

Please read this thread. Most likely there is an error in your sql statement.

thanks yaarr.. i'm checking it out.. lemme c it!

Thank you my dear.. thank you so much... i really love you!! you took me out of this problem.. oh God!! Actually I'd included another database also in g.php, that's reason behind this bug.. Now after using

echo mysql_error();

syntax, i cud find out that another database mucked up.. it was the reason behind the problem..

Again my sincere thanks... Anyway feel free to visit my website www.tado.in...

Have a gud day!!

Please consider to mark this thread solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.