php - 有没有mysql运算符 `both`

标签 php mysql codeigniter grocery-crud

我将 CodeIgniter 与 GroceryCrud 一起使用, 当我尝试进行搜索时,响应是 mysql 错误。

错误包含下一条消息:
Error Number: 1064</p><p>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 'both last_action_date LIKE '%11%' both package_id LIKE '%11%' both at line 6

这是相关查询的一部分

...FROM (`users`)
LEFT JOIN `users` as j9e598a93 ON `j9e598a93`.`id` = `users`.`accountant_id`
LEFT JOIN `users` as j0b70ca4c ON `j0b70ca4c`.`id` = `users`.`affiliate_id`
WHERE  `id`  LIKE '%11%'
both `last_action_date`  LIKE '%11%'
both `package_id`  LIKE '%11%'

我不熟悉“BOTH”mysql 运算符,我找不到它。

有人认识这个运营商吗? 它真的存在还是 GroceryCrud 错误?

最佳答案

does anyone knows this operator?

在您的查询中,假定 BOTH 标记用作中缀 bool 运算符。 mysql 中没有这样的定义,因此 mysql 查询解析器无法解析查询。

is it really exists or it's a GroceryCrud bug?

肯定是生成了错误的SQL查询导致的bug。

关于php - 有没有mysql运算符 `both`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26705680/

相关文章:

Mysql2::Error 无法初始化字符集utf8mb4 (路径:/usr/share/mysql/charsets/)

php - Windows 10 上的 MySQL 出现问题(php、MySQL、MAMP)

php - 如果存在则选择值,否则加载默认值

php - 子div不随父调整大小

optimization - 需要帮助优化 MySQL 查询 - JOIN 未使用正确的索引

javascript - AJAX错误303处理

php - 为 Laravel 事件设置队列的最佳方法是什么?

php - 使用变量检查现有表

php - 无需数据库交互的动态状态更新

php - 连接到数据库而不写入警告/错误消息