Is there a mysql `both` statement

I am using CodeIgniter with GroceryCrud, when I try to search, the answer is mysql error.

the error contains the following message:
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

and here is part of the relevant query

...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%'

      

I am not familiar with the mysql "BOTH" statement and I could not find it.

Does anyone know this operator? does it really exist or is it a GroceryCrud bug?

+3


source to share


2 answers


Does anyone know this operator?

Your request is using a token BOTH

that is supposed to be used as an infix boolean operator. There is no such function defined in mysql, so the mysql query parser does not parse the query.



does it really exist or is it a GroceryCrud bug?

This is definitely an error caused by a bad SQL query.

+2


source


Seems to be a GroceryCrud error. BOTH

is the reserved word mysql.



0


source







All Articles