Hello All,

First, Let me start by saying this question has most likely been asked 
before, but I did a search in the archive and was unable to come up with 
any results. I think this  is because I am not quite sure what this is 
called. So, I do apologize, but hopefully this can be answered quickly 
and will really help me out.

This is more of a General SQL question, regarding sytanx.

I have 3 table I am going to be working on. contact, address and state.
state contains 51 states (Washington D.C is listed as a state) each with 
their unique ID. Contact contains a persons first and last name, as well 
as their own ID. Address contains their street name, the city, state and 
a column called contactid for the id of the person who lives there.

State is a foreign key for the state table and contactid is a foreign 
key for the contact's id.

Now here is what I want to do:

I want to insert a person into the contact database and then insert 
their address into the address table, but I want to somehow put the ID 
of the state, and the id of the contact into the fields without actually 
  having to know the values.

Like rather then having to look up New York and then insert 033, can I 
just somehow put "New York"?

Is this possible to do?

Many thanks
-Steven

mysql, sql, query





---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to