小编Bab*_*ker的帖子

查询在phpmyadmin中运行正常,但不是从脚本运行

$query_string = "UPDATE _notifications SET _notifications.notification_flag = 0 WHERE _notifications.notification_id = 'JTQBPULM3M' ;
UPDATE _notifications SET _notifications.notification_flag = 0 WHERE _notifications.notification_id = 'KC7KZT2JAT' ;
UPDATE _notifications SET _notifications.notification_flag = 0 WHERE _notifications.notification_id = 'M6L5T5Z2K0' ;";
$this->db->query($query_string);
Run Code Online (Sandbox Code Playgroud)

查询从phpmyadmin运行正常但如果从php运行则抛出此错误:

错误号码:1064

您的SQL语法有错误; 检查与MySQL服务器版本对应的手册,以便在第2行的'UPDATE _notifications SET _notifications.notification_flag = 0 WHERE _notificati'附近使用正确的语法

UPDATE _notifications 
SET _notifications.notification_flag = 0 
WHERE _notifications.notification_id = 'JTQBPULM3M' ; 

UPDATE _notifications 
SET _notifications.notification_flag = 0 
WHERE _notifications.notification_id = 'KC7KZT2JAT' ; 

UPDATE _notifications 
SET _notifications.notification_flag = 0 
WHERE _notifications.notification_id = 'M6L5T5Z2K0' ; …
Run Code Online (Sandbox Code Playgroud)

php mysql sql codeigniter phpmyadmin

1
推荐指数
1
解决办法
178
查看次数

C++字符串值作为另一个字符串名称

如何在C++中将vartiables值转换为其他名称?就像在这个PHP片段.

$string = 'testVar';

${$string} = 'test';

echo $testVar; // test
Run Code Online (Sandbox Code Playgroud)

c++

0
推荐指数
1
解决办法
249
查看次数

如何只用几天和几个月就能得到一年?

要求:函数参数: - $ day,$ month函数应返回年份.

这可能吗 ?

php time datetime

0
推荐指数
1
解决办法
77
查看次数

"jQuery(selector)"和"$(selector)"有什么区别?

可能重复:
$和jQuery有什么区别

我注意到使用" jQuery(selector)"代替" $(selector)"的情况,两者之间有什么区别?

javascript jquery jquery-plugins jquery-selectors

0
推荐指数
1
解决办法
346
查看次数

如何在Codeigniter中为http:// localhost创建控制器?

我正在使用codeigniter并且正在考虑如何创建主页控制器,http:// localhost的控制器.截至目前,我可以访问http:// localhost / {controller}的所有控制器,但不仅仅是localhost.我的.htaccess如下:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|sandbox|scripts|robots\.txt)
RewriteRule ^(.*)$ /index.php/test/$1 [L]
Run Code Online (Sandbox Code Playgroud)

php .htaccess mod-rewrite codeigniter url-rewriting

0
推荐指数
1
解决办法
131
查看次数