Hi,
I want to update a field in another table using the PHP plugin after activation:
Code:
$userid = $row->user_id;
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$fields = array( $db->quoteName('status') . ' = Active' );
$conditions = array( $db->quoteName('id') . ' = '.$userid);
$query->update($db->quoteName('#__other_user_table'))->set($fields)->where($conditions);
$db->setQuery($query);
$db->execute();
Nothing happens. What am I missing?