PDO::query(): Argument #1 ($query) cannot be empty

You may enable debug and also check HTTP response to see what’s the cause of the error you mentioned.Post the error message then for more discussion.