MySQL服务器版本的正确语法在第1行的“1”附近使用 [英] MySQL server version for the right syntax to use near '1' at line 1

查看:138
本文介绍了MySQL服务器版本的正确语法在第1行的“1”附近使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 $ at = $ _ POST ['  titles']; 
$ bc = $ _ POST [' contents'];
$ con = mysql_connect( localhost amahoroe_gilbert !amahoro !_16newgt);
mysql_select_db( amahoroe__enrgy2014,$ con)或die(mysql_error());
$ query = mysql_query( 插入Infor_content(id,title,content)值('NULL', '$ at','$ bc'))或死(mysql_error());
$ bd = mysql_query($ query,$ con)或die(mysql_error());
if($ bd)
{
echo DATA SUBMITED;
/ * header(location:thank.php); * /
}
else
{
echo DATA NOT SUBMITED;
}
mysql_close($ con);
?>

解决方案

at =

_POST [' titles'];


BC =

$at=$_POST['titles'];
$bc=$_POST['contents'];
$con=mysql_connect("localhost","amahoroe_gilbert","!amahoro!_16newgt");
mysql_select_db("amahoroe__enrgy2014",$con)or die(mysql_error());  
$query=mysql_query("insert into Infor_content (id,title,content) values ('NULL','$at','$bc')")or die(mysql_error());
$bd=mysql_query($query,$con)or die(mysql_error());
if($bd)
{
 echo "DATA SUBMITED";
 /*header("location:thank.php");	*/
}
else
{
   echo "DATA NOT SUBMITED";
}
mysql_close($con);
?>

解决方案

at=


_POST['titles'];


bc=


这篇关于MySQL服务器版本的正确语法在第1行的“1”附近使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆