你好,这里的查询和插入不用涉及到任何插件
代码我改了下
首先确保你的信含数据库和表都存在
把$sqlrs直接出去,拿到phpmyadmin里的sql里去执行,如果能执行,那就说明肯定是没问题了的
希望能解决你的问题,望采纳
$uuid = $_POST['uuid'];
$time = time();
$conn = @mysql_connect("localhost","root","陪坦消");
if (!$conn){
die("连接数据库失败:" . mysql_error());
}
mysql_select_db("pex",$conn);
mysql_query("set character set 'utf8'");
$result = mysql_query("SELECT * FROM `my_vf` WHERE `uuid` = '$uuid'");
if(mysql_num_rows($result)){
echo "already in";
}else {
$sqlrs = "INSERT INTO `pex`.`my_vf` (`uuid`,`time`) VALUES ('$uuid','$time')";
echo $sqlrs;
mysql_query("set names 'gbk'");
if(!mysql_query($sqlrs)){
芦知 die("连接数据库失败:" . mysql_error());
}else {
echo "uuid is send ok";
}
}
mysql_close($con);
?>
$uuid = $_POST['uuid'];
$conn = @mysql_connect("localhost", "root", "拍毕");
if (!$conn) {
die("连接数据库失败:" . mysql_error());
}
mysql_select_db("pex", $conn);
mysql_query("set character set 'utf8'");
$result = mysql_query("SELECT * FROM `my_vf` WHERE `uuid` = '" . $uuid . "'");
if (mysql_num_rows($result)) {
echo "already in";
} else {
$sqlrs = "谈明INSERT INTO `pex`.`my_vf` (`uuid`,`time`) VALUES ('" . $uuid . "',time())";
mysql_query("set names 'gbk'");
if (!mysql_query($sqlrs)) {
die("连接数据库失败:" . mysql_error());
} else {
echo "uuid is send ok";
}
}
mysql_close($conn);
?>含贺告
你报的什么错,语法有点问题