I have a MySQL database, and I have two tables that are causing me problems.

One table, foo, contains the following fields:

FooID
FooFName
FooLName

The next table, foocontact, contains the following fields:

FooContactID
FooID
FooEmail
FooPhone
FooAddress1
etc., etc.

The problem I've had so far is that I run a perl script on text files to add
data to the database (I don't know perl--it was written for me by a friend).
Sometimes the script runs into problems and aborts, but it aborts after it
has already created entries in the foo and foocontact tables.  And sometimes
I go in and delete the entries in foo and foocontact before reloading the
data; sometimes I've deleted stuff from one table and not the other; as a
result, the synchonicity between the two tables seems to be off (both FooID
and FooContactID are auto-increment primary keys).  In the first hundred or
so entries of foocontact, FooID and FooContactID are identical numbers.
After that, it starts to get mixed up.  It looks like I've gone and in and
fixed some of this by hand, but it's all very confusing at this point.  I've
just loaded a new batch of data, and there are problems that I can't figure
out.

What I'm wondering is whether there is an easy way (or a way, at any rate)
to combine these two tables into one (not combine them on a select query,
but actually combine the tables themselves).  I think that I originally
split up the two tables so that one person could have multiple addresses;
but the problems that this is causing isn't worth the trouble)...it would
all be much easier if the info was together in one table.

any suggestions for where to go from here?

Thanks _very much_ for your help.

best,

Matt


---------------------------------------------------------------------
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