Could not execute query A: SELECT * FROM links WHERE schoolid=0 AND planid=4000.