[CDBI] Cascading Update
[prev]
[thread]
[next]
[Date index for 2006/02/06]
Hi everyone!
I have two tables: News and NewsCategories. As you might have guessed
the News table contains a news_category field for referencing the
NewsCategories.
I've created an admin script to allow users to create/modify/delete News
and NewsCategories entries. But I am having trouble when updating the
NewsCategories entry with a new ID. If I just change the ID in the
object and do an update nothing happens - perhaps I have missed
something as this seems the obvious way to do this.
So instead I have tried using the NewsCategories->move(etc) command. But
doing just this creates a new entry in the NewsCategories table and
leaves the old one there. So I tried adding an obj->delete for the
original entry. That works - except it has the nasty side effect of
deleting all News entries for the selected NewsCategory!!
So my (probably very simple) question is how do I change the ID of a
NewsCategories entry and is it possible to have this update all News
entries with the new NewsCategories ID?
Thanks
Jay
--
bingo, bango, bosh...
_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi
|
(message missing)
|
|
|
[CDBI] Cascading Update
Jay Hargreaves 21:38 on 06 Feb 2006
|