Turns out prepare
had bad syntax, and my table was incomplete due to a bad csv import. So, lesson learned, check the manual for syntax, and check (double check!) your tables. Thanks to Tom
and Sally
for their comments, they helped me to re-think what was I doing wrong.