Hello,
I am working with 3 tables. One is called "interc" the second is called "redundancy" and the third is called "dual". Both redundancy and interc are similar tables with the exception of two fields in redundancy: the first is "higher_facility" and second is "keyvalue". The keyvalue field in redundancy is linked to a field in interc called "ID" The third table (dual) only has 1 field (D) with a value of D.
I would like to insert the letter "D" into the higher_facility field of redundancy when the user deletes a row in interc. Below is how I am trying to accomplish this task with no luck.
Inside intercinfo.php is the following code:
function Row_Deleted(&$rs) {
ew_ExecuteScalar("INSERT INTO redundancy(higher_facility) SELECT 'D' FROM dual WHERE NOT EXISTS(SELECT keyvalue FROM redundancy WHERE redundancy.keyvalue = ID)");
}
Any help would be appreciated.
lhardee