Hi there,
Sounds like a pretty bad CakePHP problem you have there! My name is Walther Lalk, and I am probably the most experience CakePHP developer on Freelancer. I am a member of the CakePHP core development team and there isn't anything about CakePHP that I do not know!
I am also very experienced in javascript and SQL.
I know I'm new, but give me a chance and you'll be very impressed!
I will be happy to assist you with solving this problem. May I ask what database you are using, and what version of CakePHP?
Kind Regards,
Walther Lalk