我似乎无法摆脱这个错误。
警告:mysql_fetch_array():第47行/windsor.php中提供的参数不是有效的MySQL结果资源
if ($insertdb == NULL)
mysql_query("INSERT INTO `asd` (`id`, `1`, `2`,`3`, `4`, `5`, `pubdate`) VALUES (296, maddeal', 'Windsor', 'ON', '', '', '') ON DUPLICATE KEY UPDATE `1`=VALUES(`1`),`2`=VALUES(`2`),`3`=VALUES(`3`),`4`=VALUES(`4`),`5`=VALUES(`5`)") or die(mysql_error());
else
//Check and see if value has changed...
$checksql = mysql_query("SELECT `1` FROM deal WHERE `id`= 296") or die(mysql_error());
while($row = mysql_fetch_array($checksql))
{
$checksqlver = $row['deal'];
}
$checksqlver = mysql_real_escape_string($checksqlver);
//$checksqlver = stripslashes($checksqlver);
echo "$checksqlver<br>";
if ($checksqlver == $insertdb)
exit();
else
echo "No Match<br>";
//percent
最佳答案
您是否使用mysql_connect
连接到数据库?
那会导致您描述的错误。