Hello,
I've this PHP Form Plugin (Frontend and Backend , Modify, onAfterProcess) :
When I display $publie and $id, the values are correct. When I display erros from db, I have no errors.
I have checked that the query is correct in database.
However the query is not performed.
Have you got an idea ?
Best Regards
I've this PHP Form Plugin (Frontend and Backend , Modify, onAfterProcess) :
PHP:
defined('_JEXEC') or die();
$publie = $formModel->formData['publie'];
$id = $formModel->formData['id'];
if ($publie == 0)
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->clear();
$query->update('produits')->set('publie_prod = 0')->where('id = ' . (int) $id);
$db->setQuery($query);
$db->execute();
$db->commit();
}
I have checked that the query is correct in database.
However the query is not performed.
Have you got an idea ?
Best Regards