Volgens de specificaties* worden spaties verwijderd uit VARCHAR-velden vanaf
versie 5.0.3.
Op server A en B staat beide MySQL versie 5.0.22
A (PHP 5.2) verwijdert spaties wel, B (PHP 5.1.4) niet.
Kan PHP ook van invloed zijn?
* <http://dev.mysql.com/doc/refman/5.0/en/char.html>
VARCHAR values are not padded when they are stored. Handling of trailing
spaces is version-dependent. As of MySQL 5.0.3, trailing spaces are retained
when values are stored and retrieved, in conformance with standard SQL.
Before MySQL 5.0.3, trailing spaces are removed from values when they are
stored into a VARCHAR column; this means that the spaces also are absent
from retrieved values.
--
Nico Schuyt
http://www.nicoschuyt.nl/

Likes:

Quote