Have a look at the error.log in the var directory. There you should be able to see the query that fails. Please post it here. And how did you upgrade and then downgrade again? Just replaced the PHP version or did you do something with the database? Do you use MySQL or PostgreSql? Which version?