The Space
28/05/2008 | Publié dans cakephp, tips
Last week-end, I came accross a tiny but annoying problem.
I had this simple line of code :
Most of the times, it worked fine. But sometimes I had to search for “!!!” or “In Scary Stereo” and CakePHP threw an error, saying the SQL query was wrong. And it was, because CakePHP automagically transformed the “!” and the “In” into SQL operators…
I first thought that I need to force the “equal” operator, like this:
Then someone on CakePHP’s google group gave me that tip :
It didn’t work. But Grant Cox suggested me to add as simple space after the equal sign:
That worked!!
Too much magic kills the magic…
[edit]
La RC1 change quelque peu tout cela : l’opérateur passe à gauche de la flèche, et c’est bien mieux ainsi. En revanche, j’ai un gros soucis de connexion à deux bases de données différentes avec cette nouvelle version.





