Simple ESQL not working
I am having troubles getting an apparently simple ESQL statement to work.
Here's my structure:
Books <bookID_Pk = bookID_FK > BooksByAuthors < AuthorID_FK = AuthorID_PK > Authors
Here's the statement:
"SELECT b.category, a.bookID_FK
FROM BooksByAuthors as a, Books as b
WHERE a.bookID_FK = b.bookID_Pk
AND a.AuthorID = ? "
; "" ; "" ; 111 )
Ultimately I am looking to get a list of IDs and categories for a single Author; Author ID should get me a list of books written by that author in BooksByAuthors, which should then be able to tie back into the Books table to get the category.
I have tried many different forms (e.g. INNER JOIN, with/without table aliases, many many more) but keep getting a stupid question mark.
Been staring at this thing for far too long. Time to rest the eyes.