2 table query write please help

  movieflick 21:37 26 Feb 2006

Ok I am new to php and need some help.

I have created a form that rights to a customers table I have a second table that contains shop information. What I am trying to do is have the customer fill out the form and based on the zip code he/she enters write the name of the shop contained in the shop table with a matching zipcode to a column in the customers table. I hope I explained that well enough. I would greatly appreciate any help.

  harristweed 08:21 27 Feb 2006

I don't understand, if you already have the information in a table (zipcode of shop) why do you need to duplicate it in the customer table?

Anyway, to do what you ask, I think you need to first run a query on the shop table to get the shop name that matches the customer zipcode, then add this to the query that writes to the customer table.

  movieflick 08:30 27 Feb 2006

I need to write the shop they were refered to so I need to write the name of the shop in the customer table that will later be outputed to an invoice. I dont know the customers zip until after they fill out the form so I need to query and based on the form zipcode input then write the name to the table.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

HTC U12 Plus review: Hands-on

Best Android emulators for Mac

TV & Streaming : comment regarder Roland Garros ?