Hi,
I think, I know what going wrong. There is 2 possibilities, maybe there is php version issue or mysql.
If not, then its because of buggy code. I need to debug that, I'm doing dinner right now, I will be free in 15mins then will fixed your issue :) btw I have 5 years of experience in web development using php and mysql. You can also see my previous freelance project :) all are related to web. please ignore spelling miatake using mobile app.
Thanks and Regards,
Nabeel Abid