gpt4 book ai didi

php - PHP 中的 MySQL 语法错误

转载 作者:行者123 更新时间:2023-11-29 01:10:18 25 4
gpt4 key购买 nike

<分区>

$query = "INSERT INTO textbooks (uid, title, edition, author, isbn, condition, description, photo) VALUES (9, 'q', 'a', 'b', 'c', 'd', 'e', '$extension')";

$result = mysql_query($query) or die('Could not connect: ' . mysql_error());

Could not connect: 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 'condition, description, photo) VALUES (9, 'q', 'a', 'b', 'c', 'd', 'e', '.jpg')' at line 1

我一直收到 MySQL 语法错误,但我终究无法找出问题所在。我放入随机变量、字符串和 int 只是为了测试,但它不起作用。

  1. title, edition, author, isbn, condition, description, photo are all varchars
  2. uid is an int
  3. description is text

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