kann sein weil ich noch f5 drücke .. ups : mache ich nie wieder ... sorry
also so wäre derzeit der mysql code und es fehlen die Bundesländer anhand der Orte oder der PLZ
PHP-Code:
SELECT NULL as "Bundesland", plz.text_val AS "PLZ", name.text_val AS "Ort", NULL
FROM geodb_textdata plz, geodb_textdata name
WHERE name.loc_id = plz.loc_id
AND plz.text_type =500300000
AND name.text_type =500100000
AND (plz.text_val like '$eingabe%' or name.text_val like '$eingabe%')
UNION
SELECT name.text_val, NULL, NULL, locations.loc_id
FROM geodb_locations locations
LEFT JOIN geodb_textdata name ON name.loc_id = locations.loc_id
WHERE loc_type = 100300000
AND name.text_type = 500100000
AND name.text_val LIKE '$eingabe%'
Kommentar