SunQuest
           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:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old April 19th, 2003, 04:42 PM
ricesteam ricesteam is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 25 ricesteam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
references question

Hello,

I am wondering how do you use references correctly so when I delete a row from one table, similar rows will be deleted from other tables?

Thanks

Reply With Quote
  #2  
Old April 24th, 2003, 07:45 PM
sliver's Avatar
sliver sliver is online now
Moderator
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: WI, USA
Posts: 888 sliver User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 h 17 m 29 sec
Reputation Power: 2
Send a message via AIM to sliver Send a message via XFire to sliver
RE: references question

Couldn't you just do multiple queries.

Reply With Quote
  #3  
Old April 28th, 2003, 02:23 PM
ricesteam ricesteam is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 25 ricesteam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: references question

haha Im just too lazy, that's all..=p

Reply With Quote
  #4  
Old April 28th, 2003, 09:07 PM
superalloy superalloy is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Washington DC
Posts: 58 superalloy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: references question

are you using mysql 4.x or 3.x?, In general, you should probably just use 2 queries and say:

DELETE FROM 'tableone' WHERE id = value;
DELETE FROM 'tabletwo' WHERE tableoneid = value;

that is for 3.x, there is a new table type in mysql 4.x that incorporates some referential integrity stuff, but I haven't looked into it.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > references question


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