wer kann helfen
ergibt folgende fehlermeldung:
8760 KaufYou have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use
near '(`ort` LIKE '%' OR `plz` LIKE '%') (`ort` LIKE 'Kauf%' OR `plz
danke
PHP Code:
$keyword = $search_word;
$keywords = explode(" ",$keyword);
$query = array();
foreach($keywords as $keyword) {
$query[] = "(`ort` LIKE '".$keyword."%' OR `plz` LIKE '".$keyword."%')";
}
$query = implode("\n ",$query);
$sql = "SELECT `id`, `ort`, `plz` FROM `firma` WHERE ".$query." ;";
$result = mysql_query($sql) OR die(mysql_error());
$res = mysql_query($sql);
8760 KaufYou have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use
near '(`ort` LIKE '%' OR `plz` LIKE '%') (`ort` LIKE 'Kauf%' OR `plz
danke
Comment