These are probably fewer Cake related issues and PHP / MySQL related issues. (Others have already created the encoding, so I will skip this.)
Single quotes mean that the literal string is passed to MySQL: 'Item.name != ' => ''
PHP (a la Cake) probably parses this line literally. In fact, it can even parse it like this:
"Item.name != "
(donβt notice that there is nothing after the operand, and if it is the last in the SQL query, the query will not be an error, it will probably work anyway!)
When you were intended for testing:
"Item.name != ''"
(note that only single quotes are included in this line)
However, since you are not getting an error - and the rest of the data is pulling! - you probably want to edit this statement because your problem is more of syntax.
'Item.name IS NOT NULL' 'Item.name <> ' => '' 'Item.name IS NOT' => ''
Try to try.
http://dev.mysql.com/doc/refman/5.6/en/comparison-operators.html describing IS NOT NULL vs IS NOT (bool) vs <> and! = (not equal).
Hth :)
Opensorceress
source share