So jetzt habe ich es. Habe die LOWER() von mysql in php implementiert. Aber warum das nicht mit SQL ging ist mir schleierhaft.
PHP-Code:
$umlaute = array("ä", "Ä", "ü", "Ü", "ö", "Ö", "ß");
$replace = array("ae", "ae", "ue", "ue", "oe", "oe", "ss");
foreach ($umlaute as $a) {
$search[] = mb_convert_encoding($a, "utf-8");
}
$res =& $this->_db->query("
SELECT id,
CONCAT(c.name_f, '_', c.name_l) AS folder,
CONCAT(c.name_f, ' ', c.name_l) AS name
FROM contacts c, lnk_company_contact lcc
WHERE (c.id = lcc.id_contact)
AND (c.public = '".$public."')
AND (lcc.id_company = '".$company_id."')
ORDER BY c.name_f");
while($row =& $res->fetchRow(DB_FETCHMODE_ASSOC)) {
$row['folder'] = strtolower(str_replace($search, $replace, $row['folder']));
$employees[] = $row;
}
Kommentar