Whats wrong in dis code???

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Whats wrong in dis code???

    Code:
    <?php
    include("conf.php");
    include("func.php");
    connect($dbserver,$dbname,$dbuser,$dbpass);
    	$week_day 	= date("w");
    	$today 		= date("Ymd");
    	// Today 
    	$week_day 	= date("w");
    	$today 		= date("Ymd");
    	// Today 
    	$result 	= mysql_query("SELECT `ur` FROM `sites` WHERE `id`=$sid AND `date`=$today LIMIT 1;");
    	$row 		= mysql_fetch_array($result);
    	$host_today = $row['host'];
    	//---------------------  --------------------------
    	$result		= mysql_query("SELECT * FROM `sites` WHERE `ur` >= $host_today AND `date`=$today ORDER BY `host` DESC;");
    	$top_place 	= mysql_num_rows($result);
    	echo "<b>Place in Top:</b> \n";
    	echo "<font color='red'>$top_place<br/></font>\n";
    	?>
    its giving error

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/xyz/public_html/adc.php on line 13

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/xyz/public_html/abc.php on line 17\


    whats wrong??????

    http://WapTops.com- Get Real High Traffic
    http://WapFun.info-Fun 4 Wap

    #2
    you might have mist spelt something in ur mysql_query check to see if the tables and row are created or spelt properly , have another look at the mysql query in abc.php
    Last edited by realcoder; 12.05.10, 05:36.

    Comment


      #3
      thnx bro. it worked.

      http://WapTops.com- Get Real High Traffic
      http://WapFun.info-Fun 4 Wap

      Comment

      Working...
      X