|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
RE: references question
Couldn't you just do multiple queries.
|
|
#3
|
|||
|
|||
|
RE: references question
haha Im just too lazy, that's all..=p
|
|
#4
|
|||
|
|||
|
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. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > references question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|