Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase 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 Codewalkers Forums Sponsor:
  #1  
Old November 15th, 2003, 06:52 AM
DorkRawk DorkRawk is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 173 DorkRawk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to DorkRawk
createing new item

How would I go about createing a new item in a table when a field value in a different table is entered. For example.... in my 'users' table there is a "bandname" field and I would like to create a new entry in my 'bands' table whenever a user enters a value for their "bandname" field. Let me know if this isn't clear and I will try to explain it better.

Reply With Quote
  #2  
Old November 15th, 2003, 11:08 AM
prycejones prycejones is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 87 prycejones User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 44 sec
Reputation Power: 2
Send a message via ICQ to prycejones
RE: createing new item

Hi,

It is relatively easy to insert a new record with PHP but I dont think you are asking this are you?
I think you are asking if a new record can AUTOMATICALLY be added when something happens to your `users` table.

What you could do with is a facility called triggers, and triggers arent yet written into MYSQL.

The manual states....

Quote:
Triggers are scheduled for implementation in MySQL version 5.1. A trigger is effectively a type of stored procedure, one that is invoked when a particular event occurs. For example, you could set up a stored procedure that is triggered each time a record is deleted from a transactional table and that stored procedure automatically deletes the corresponding customer from a customer table when all their transactions are deleted.



Info taken from
http://www.mysql.com/doc/en/ANSI_diff_Triggers.html

IIHUWYSIHTH
If I Have Understood What You Said I Hope This Helps

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > createing new item


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