You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EDIT: It looks like the issue seems to be occurring due to it placing NOW() inside single quotes when executing the query causing mysql to treat it as a field rather than a function. Any idea how to get around this?
EDIT 2: I realized you can pass false for escape strings which is what I want for executing the NOW() function, but for some reason, it keeps appending the AS keyword after the function? Any idea why this is?
I'm using the query above, but it seems to return this with the AS keyword which is clearly not right?:
ComQueryPacket {
command: 3,
sql:
'SELECT * FROM `account` WHERE last_update >= NOW() AS `- INTERVAL 1 MINUTE`' }
The text was updated successfully, but these errors were encountered:
Hey @sphiinx, off the top of my head, I'm not sure why it would do that but surely it can be solved. I've been really busy trying to meet a deadline on a big project due mid-July so I haven't been able to answer questions for my open-source projects. I'd be more than happy to accept a PR with the solution, though, as long as it includes a test to go along with it!
I need to select data where ``last_update
>= now() - INTERVAL 1 MINUTE
Example of what I'm currently trying to use:
EDIT: It looks like the issue seems to be occurring due to it placing NOW() inside single quotes when executing the query causing mysql to treat it as a field rather than a function. Any idea how to get around this?
EDIT 2: I realized you can pass false for escape strings which is what I want for executing the NOW() function, but for some reason, it keeps appending the AS keyword after the function? Any idea why this is?
I'm using the query above, but it seems to return this with the AS keyword which is clearly not right?:
The text was updated successfully, but these errors were encountered: