Invalid SQL: SELECT COUNT(*) AS count FROM attachment WHERE posthash = 'invalid posthash' AND userid =