> How can I overtake the fieldvalues of city and the first part of the
> phonenumber. It should read out the value of the zipfield and check them
> with the content of the table "ort". If there is found a recordset with
> the same plz the formfields city and the the field "vorwahl" should get
> the values of the fields of the recordset.
I'm having troubling understanding exactly what you want and I don't
have time to decipher all the code in the hope it will tell me. My best
guess is you want to use the zipcode from one table, to automatically
add the city name into a form from another table. If that is so, you
can do it with your query using a join.
SELECT Kunden.*, City.name, City.vorwahl FROM Kunden LEFT JOIN City
This assumes that `zipcode` exists in both tables and is unique in the
"City" table. You should also process the City.name and City.vorwahl
results for NULL results where `zipcode` does not exist in the "City"
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php