My team and I have been busting our asses the last 2 weeks on a very large and very rush project. We chose to use CakePHP as our framework to help us get it up and running quickly. For the most part everything has run pretty smoothly, until today.
Earlier I was working on an “advanced search” feature. I got it all running and working pro by 5pm. Checked in my work, updated the dev server and went home. I got back on later in the night to do some more work and noticed that the search was now returning a bunch of errors. Turns out that $model->query() works very differently from MySQL 5.0.45 and 5.1.30. Typically, query returns a result set with the table name as an index. However this is not the case with MySQL 5.0.45. It simply returned a result set with the indexes set to “0”. Took me the better part of 2 hours to figure that out. Very annoying. Had to whip up a very ugly hack (foreach loop in a foreach loop?!) to keep things running smoothly. It has definitely been marked to fix in a later iteration.