note 108680 added to function.mysql-fetch-array
| From: | Anonymous | Date: | Thu, 17 May 2012 07:00:00 +0000 |
| Subject: | note 108680 added to function.mysql-fetch-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-188026@lists.php.net to get a copy of this message | ||
I have hosted a new BUX site crimsonbux.co.cc but I am getting MYSQL errors again and again. I am
getting the following error.
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in
/home/a5842986/public_html/config.php on line 53
And this my config.php file.
<?php
//Connect to MySQL server///////////////////////////////////////////////////////////////
////
$con = mysql_connect($dhost, $dusername, $dpassword) or die("Cannot Connect"); ////
mysql_select_db($ddatabase, $con); ////
////
if($_COOKIE["usNick"] and $_COOKIE["usPass"])
////
{ ////
$q = mysql_query("SELECT * FROM tb_users WHERE
username='{$_COOKIE['usNick']}' AND
password='{$_COOKIE['usPass']}'") or die(mysql_error());
////
if(mysql_num_rows($q) == 0) ////
{ ////
$_COOKIE['usNick'] = false; ////
$_COOKIE['usPass'] = false; ////
} else { ////
$loggedin = 1; ////
$r = mysql_fetch_array($q); ////
} ////
} ////
$da = date("j"); ////
////
$queryxx = "DELETE FROM ad_clicks WHERE day!='$da'";
////
mysql_query($queryxx); ////
////
$q2 = mysql_query("SELECT * FROM settings"); ////
while($r2=mysql_fetch_array($q2)) ////
{ ////
$set[$r2[setname]]=$r2["setvalue"]; ////
} ////
mysql_query("UPDATE settings SET setvalue='0', set_day='{$da}' WHERE
set_day!='{$da}' AND set_day>'0'") or die(mysql_error());
////
$user=$_COOKIE['usNick']; ////
?>
Any Solution friends? Please help me out.
----
Server IP: 69.147.83.197
Probable Submitter: 101.210.103.206
----
Manual Page -- http://www.php.net/manual/en/function.mysql-fetch-array.php
Edit -- https://master.php.net/note/edit/108680
Del: integrated -- https://master.php.net/note/delete/108680/integrated
Del: useless -- https://master.php.net/note/delete/108680/useless
Del: bad code -- https://master.php.net/note/delete/108680/bad+code
Del: spam -- https://master.php.net/note/delete/108680/spam
Del: non-english -- https://master.php.net/note/delete/108680/non-english
Del: in docs -- https://master.php.net/note/delete/108680/in+docs
Del: other reasons-- https://master.php.net/note/delete/108680
Reject -- https://master.php.net/note/reject/108680
Search -- https://master.php.net/manage/user-notes.php