Hi, ich bekomme bei dieser Abfrage mit einem Umlaut kein Ergebnis. Wenn ich das Query aber direkt in sqlmyadmin eintippe, dann liefert es Ergebnisse zurück. Was mach ich falsch?
PHP
function get_posts_witht() {
global $wpdb;
$sql = "
SELECT post_title
FROM $wpdb->posts
WHERE (
post_status = 'publish'
AND post_password = ''
AND post_title LIKE 'Ä%'
)";
$Results = $wpdb->get_results($sql);
$i = 0;
foreach ($Results as $Result) {
$All[$i]['Title'] = $Result->post_title;
$i++;
}
return $All;
}
$All = get_posts_witht();
echo 'Titel: '.$All[0]['Title'].'<br/>';
Alles anzeigen