Problem with the syntax

I having difficult time finding out the problem with the syntax in the query:pastebin

In the pastebin you will also see the message I get.
As you see it is executed using a perpared statement…furthermore if I run the exact same query in the console(Netbeans IDE) everything goes OK.
Here is the query that runs OK in the console:

select count(*) from appointments 
WHERE appont_close_time 
BETWEEN '2016-02-01' 
AND '2016-02-04'
AND bookedfor=(select user_ID from users where concat(name,' ',lastname) like 'kostas kouloglou')
AND apps_origin='frontend';

I found the error…

1 Like

Hi there @designtrooper - well done. Would you like to share the solution in case it might help someone else in the future?

If you look in the pastebin…in the query itself,towards the end and after apps_origin there is a parentheses.I just removed it.

That’s it.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.