SunQuest
           MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old June 27th, 2000, 01:30 PM
weirdity weirdity is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 4 weirdity User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have a database of cards. The database looks something like this:

table cards:
cnum int(11) Pri Key auto_increment
ctitle Varchar(50)
type int(11)
artist int(11)
etc...

type and artist both link to other tables for normalization as:

table type
tnum int(11) Pri Key auto_increment
type varchar(50)

artist looks basically the same.

Now I have the data that I want to load in in a txt file that I loaded into a temp table that looks like:
cnum int(11) Pri Key auto_increment
ctitle Varchar(50)
type Varchar(50)
artist Varchar(50)
etc...

now for the question. How do I get the data from card.temp to card.list AND card.type AND card.artist?

All tables are currently blank so I want it to take the type and add it to card.type and put that number in card.list.type if the name already exists I want it to take the number from the one that already exists and place it in the list. I know this can be done, I just have not been able to find the correct command yet.

Thanks in advance,

Jason

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > Inserting data into multiple tables with Join


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway