class PostController extends Controller
{
/**
* @param Request $request
* @Route("/post", name="post")
*/
public function newAction(Request $request)
{
// create a Post and give it some dummy data for this example
$task = new AdsList();
$task->setTitle('Write a
我试图通过更新查询更新一个数据库,但是我得到了一个错误,上面写着
Error com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'add=null,col=null,wok=null,pcol=null,pwok=null,bio=null where u
我有几行代码可以报告OpenCart 1.4.9中的优惠券,但我不能克服这个错误:
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
'order where coupon_id = 16' at line 1.
$getcouponinfo1 = mysql_query("select * from order where coupon_id = $
有人能明白为什么这不管用吗?
$category = 1;
$CategoryResult = mysql_query("SELECT * FROM Category WHERE Index = '$category'");
if (!$CategoryResult)
die("Could not retrieve results from category $category: " . mysql_error());
Mysql错误如下:
无法检索类别1的结果:您的SQL语法有错误;请检查与MySQL服务器版本对应的手册,以便在第1行
我从来没有考虑过它的含义,我在mysql中创建了一个名为"add“的专栏。(显然,我在创建表时并没有想到add是一个保留字),而在每次查询时,这被证明是一个问题。我已决定更改名称,但现在也无法更改。
我尝试了以下变体:都不起作用
mysql> alter table ml_n1 m modify column m.add addmovie tinyint(4);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual th
我有两张桌子:tweet (a.o )。包含列tweet_id)和引用(包含列tweet_id和class_id)。并不是所有的推文都被分配给class_id。我希望它能够提取推特的所有信息,包括使用它的class_id (如果它已经设置):
SELECT t.*, r.class_id FROM tweets t
LEFT JOIN references r ON (t.tweet_id = r.tweet_id)
ORDER BY t.tweet_id DESC LIMIT 50
但是,我一直有个错误
#1064 - You have an error in your SQL synt
我在我的php脚本中使用mysql已经超过6年了,但是我从来没有遇到过这样的错误。
当我执行这个SQL命令时:
SELECT `discount_items`.* FROM `discount_items` WHERE (position=1) AND (active=1) AND (end<=1344007212) AND (show=1) LIMIT 1
它抛出了这个错误
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server versio
以下是声明:
SELECT order.order_id, order.member_id, order.date_ordered, coupon.coupon_name, coupon.coupon_type, coupon.coupon_amount
FROM order
LEFT JOIN coupon
ON order.coupon_id = coupon.coupon_id
下面是MySQL错误:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server v
我对MySQL非常陌生,我尝试根据用户名和行索引更新表行,但它不起作用。告诉我在'INDEX = 54‘附近有一个错误。
索引是自动递增主索引列的名称.
UPDATE `TABLENAME`
SET NAME = 'NAME', DESCRIPTION = 'DESC'
WHERE USER = 'name' AND INDEX = 54
事实上,甚至:
SELECT * FROM `tablename` WHERE INDEX=30
不起作用;它说:
#1064-您的SQL语法出现了错误;请检查与您的MySQL服务器版本对应的
我想在phpMyAdmin中更新表中所有行的特定列。
我使用的是:
UPDATE jk_m1_users SET group = '2' WHERE group = '1'
然而,我得到了这个错误消息:
#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 'column1 = 2 WHERE column1 = 1'
我的程序有问题,我不知道出了什么问题。我对密码有问题:
public boolean checkGroup(String groupname){
connect();
createtableuser();
int count = 0;
String query = "SELECT COUNT(*) FROM `groups` WHERE group = '"+groupname+"';";
System.out.println(query);
try
这就是错误
Could not enter data: 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 ')' at line 1
这是我的问题
$sql = 'INSERT INTO list '.
'(bond_amount,bond,prize,prize_amount,draw,draw_date,held_at)
我是mysql的新手,并且从mysql数据库编写sql脚本,我的大多数表都可以工作,但有些表不能工作,mysql错误几乎是不可描述的。这可能与多个外键有关。
create table Users (
id int not null auto_increment,
type enum('t1', 't2', 't3') not null,
name char(30) not null,
phone char(15),
email char(30),
username char(30),
pa
我有一个包含3行文件的表: name、desc、user。
名称是文件的名称,例如: cert1.pdf,Desc是对文件的描述,例如:年度第一次考试。User是将文件上传到服务器的用户的名称,例如: John。
现在我想检索cert1.pdf的名称和描述。所以这就是我得到的:
$sql = "SELECT desc, user
FROM files AS f
WHERE f.name = 'cert1.pdf'";
$result = mysql_query($sql);
if (!$result) {
die
错误:
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 'Default=0 WHERE Default=1 AND UserID=3' at line 1
由于某种原因,它不起作用,我看不出这段代码有什么错误。
正在尝试更新数据库,以设置默认的0(如果用户if为1,如您所见)。
非常感谢。
try
{
using (
MySqlCom
我试图使用这个查询在mysql表中添加一个列,但是mysql在抱怨语法。我见过很多消息来源,但我看不出这里出了什么问题。
mysql> ALTER TABLE dog add date TIMESTAMP(14);
错误:
ERROR 1064 (42000): 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 '(14)'
at line 1
表名“狗