Hey All,
I have a custom field 'mao' in both Contacts and Accounts that is updated via Accounts mass update.
I'm trying to set the contacts mao to equal the Accounts mao on update and thought the following function would do the trick, but I can't figure out where to put it (Accounts.php? Contacts.php? ListView.php?)
Any thoughts?PHP Code:function conatctsMAO(){
$update_mao =" UPDATE accounts,contacts,accounts_contacts SET contacts.mao = accounts.mao WHERE accounts.id = accounts_contacts.account_id AND contacts.id = accounts_contacts.contact_id ";
$db = & PearDatabase::getInstance();
$result = $db->query($update_mao);
}


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks