Mailinglisten-Archive |
Hi Liste!
Nun hab auch ich mal ein Problem. Ich stehe vor einem Rätsel: Warum sind
beim untenstehenden Code alle Variablen (wie $title) leer? mysql_error
spuckt nichts aus was mir weiterhelfen könnte... Wenn ich das erzeugte Query
von Hand eingebe bekomme ich auch meine Daten, warum so nicht?
function content($search) {
if (mysql_connect("localhost", "steptown", "foobar")) {
mysql_select_db("steptown");
$content = mysql_query("SELECT * FROM normal_pages WHERE page_name
LIKE '" . $search . "'");
mysql_close();
return $content;
$title = $content[1];
$box_title = $content[2];
$box_content = $content[3];
$keywords = $content[4];
$description = $content[5];
}
else echo mysql_errno() . ": " . mysql_error();
}
php::bar PHP Wiki - Listenarchive