gpt4 book ai didi

php - fatal error : Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064

转载 作者:太空宇宙 更新时间:2023-11-03 11:37:36 26 4
gpt4 key购买 nike

<分区>

我在向数据库中插入一些数据时遇到此错误。我插入数据的代码如下。整个错误消息是:

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 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 '','nmnm','Female','01/06/2017','info@example.com','9999999999')' at line 1' in /home/avfswallet/pancard.avfswallet.com/user.php:35 Stack trace: #0 /home/avfswallet/pancard.avfswallet.com/user.php(35): PDO->query('INSERT INTO use...') #1 {main} thrown in /home/avfswallet/pancard.avfswallet.com/user.php on line 35

$category=$_POST['category'];
$req_type=$_POST['requestType'];
$lname=$_POST['last_name'];
$fname=$_POST['first_name'];
$mname=$_POST['middle_name'];
$gender=$_POST['iCheck'];
$birth=$_POST['dob'];
$email=$_POST['email'];
$phone=$_POST['phone'];
echo $category."<br/>";
echo $req_type."<br/>";
echo $lname."<br/>";
echo $fname."<br/>";
echo $mname."<br/>";
echo $gender."<br/>";
echo $birth."<br/>";
echo $email."<br/>";
echo $phone."<br/>";
$query="INSERT INTO users (app_category,user_title,last_name,first_name,middle_name,gender_type,dob,email_id,phone_no) VALUES('{$category}','{$req_type}','{$lname}',{$fname}','{$mname}','{$gender}','{$birth}','{$email}','{$phone}')";

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com