2 table query write please help

  movieflick 21:37 26 Feb 06

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 06

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 06

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.

The Legend of Zelda Breath of the Wild review: Five hours with Zelda on the Nintendo Switch

1995-2015: How technology has changed the world in 20 years

How the painting-like animated sequences in A Monster Calls were created by Glassworks Barcelona

The 22 best Safari extensions | Best Safari plugins: Improve Apple's Safari web browser with these…