我快疯了.救命
还是SQL语句问题
<?
include("config.php");
global $connet,$root_name,$root_pw,$sqldate;
$connect=mysql_connect("$connet","$root_name","$root_pw");
$select=mysql_select_db("$sqldate") or die("数据库打开错误,请联系管理员");
$in_admin=$_POST['admin'];
$sql='update `note` set `admin`='.$in_admin.' where `id` =4';
$query=mysql_query($sql);
$rs=@mysql_fetch_array($query) or die(mysql_error()) ;
?>
这到底什么错啊?测试就是
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where `id` =4' at line 1
报错.....我左看右看都觉得没错啊.我前面写SQL语句的时候都是这样写的啊.没错啊.我是按照格式写的.闷了.
拜托救命啊