Hey guys I'm new to this I bought this script yesterday and on my site I keep getting this Warning need help!!!


Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in D:\Hosting\6967501\html\config.php on line 13

<?php
// Provide Values for Database
$dbhost="MYHOST";
$dbname="DB_NAME";
$dbuser="DB_USER";
$dbpass="DB_PASSWORD";

//Don't change the below 2 lines
  $dbconnect=mysql_connect($dbhost,$dbuser,$dbpass);
  mysql_select_db($dbname);

$rs=mysql_query("select * from adminsettings");
if(mysql_num_rows($res)>0) {
$arr=mysql_fetch_array($rs);
$sitename=$arr[0];
$siteurl=$arr[1];
$webmasteremail=$arr[2];
$adminpass=$arr[3];

On line 13 you added an 'e' to $rs. Your code should be

if(mysql_num_rows($rs) > 0)

dw, you should definitely omit your SQL DB info at the top of your code, people could do very bad things.

my Config.php give me error........ here is details.......

<?php
// Provide Values for Database
$dbhost="localhost";
$dbname="xxxxxxxxxx";
$dbuser="xxxxxx";
$dbpass="xxxxxxxxxx";

//Don't change the below 2 lines
  $dbconnect=mysql_connect($dbhost,$dbuser,$dbpass);
  mysql_select_db($dbname);

$rs=mysql_query("select * from adminsettings");
if(mysql_num_rows($rs)>0) {
$arr=mysql_fetch_array($rs);
$sitename=$arr[0];
$siteurl=$arr[1];
$webmasteremail=$arr[2];
$adminpass=$arr[3];

$alertpay=$arr[4];
$Inpays=$arr[5];
$Sfipay=$arr[6];

$fee=$arr[7];

$levels=$arr[8];

$level1=$arr[9];
$level2=$arr[10];
$level3=$arr[11];
$level4=$arr[12];
$level5=$arr[13];
$level6=$arr[14];
$level7=$arr[15];
$level8=$arr[16];
$level9=$arr[17];
$level10=$arr[18];

$forcedmatrix=$arr[19];
$membershipperiod=$arr[20];
$signupbonus=$arr[21];
}
?>
Member Avatar

LastMitch

@anurag2013

Can you open a new thread?

Your problem is different from the other members.