MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old June 15th, 2004, 12:04 PM
jshaulis jshaulis is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 1 jshaulis User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
MySQL joining tables...

Hello, I am pretty new at this stuff but here it goes,

I have 2 tables, one that has
$query="CREATE TABLE products (id int(6) NOT NULL auto_increment,fname varchar(15) NOT NULL,lname varchar(15) NOT NULL,stage2 varchar(20) NOT NULL,itemnumber varchar(20) NOT NULL,quanity varchar(20) NOT NULL,email varchar(30) NOT NULL,location varchar(30) NOT NULL,PRIMARY KEY (id),UNIQUE id (id),KEY id_2 (id))";

In the 2nd table I want to have 3 items, itemnumber, quanity, and descrition.
I want itemnumber from the 1st table to refer to the 2nd table and update the quanity. For example, If I order 3 of item #12345 then i want it to update the #12345 to 3. And then say in a week someone else orders 4 of #12345 then i want it to change to 7. How would I go about linking these tables together. Any help would be nice. Thanks in advance,

Justin

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > MySQL joining tables...


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 1 hosted by Hostway