The problem is not with every one of them. Anyway thanks for your help, I'll just debug one by one.
There is no easier way to find that error. Maybe you should try with using mysql_log(LOG_ALL). Query will be printed before the error so you will be able to see where the error is.