Answer the question
In order to leave comments, you need to log in
Why does the same SQL query return different results in JS and phpMyAdmin?
I have a db. One of the tables stores json arrays with user ids in the form of strings ('[1,2,3]')
When I make such a request through phpMyAdmin's sql console
SELECT * FROM conversations WHERE members REGEXP '(\\[|\,)+(1)(\\]|\,)+'
pool.execute("SELECT * FROM conversations WHERE members REGEXP '(\\[|\,)+(1)(\\]|\,)+'")
Answer the question
In order to leave comments, you need to log in
Maybe it's the lack of escaping characters in a string expression in js https://learn.javascript.ru/string#spetssimvoly
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question