I am struggling with how best to handle deletion and sql queries.
Here is an example query that links several tables:
s = s+ "SELECT " s = s+ "gifts.*, " s = s+ "gifts.gift_id, " s = s+ "stores.*, " s = s+ "stores.store_id "
s = s+ "FROM gifts, stores WHERE gifts.person_ptr = " s = s+ str(personID) s = s+ " AND " s = s+"stores.recID = gifts.store_ptr"
The "gifts" table uses "kv_setNull" on its store pointer so that when a store is deleted the value is set to "0".
The query above works fine until I delete a store - then, of course, the query fails because
"stores.recID = gifts.store_ptr"
would mean "stores.recID = 0"
How do I structure this so I can also get items whose "store_ptr" has been nulled?
Cheers,
Ian
_______________________________________________ Valentina mailing list Valentina at lists DO.T macserve.net http://lists.macserve.net/mailman/listinfo/valentina
©2003 Ian Devaney |