I have PHP 5 code accessing a MyISAM table on MySQL 5 server. The query looks like this:
SELECT CONCAT(fName1,\' \',mName2,\' \',lName3) AS userName FROM us
In MySQL concatenating any string to a NULL value results in NULL. You have to check for NULL before concatenate using IFNULL:
SELECT CONCAT(IFNULL(fName1,''),' ',IFNULL(mName2,''),' ',IFNULL(lName3,'')) AS userName FROM users WHERE level > 10