How to update module param in the database? - Joomla! Forum - community, help and support
i update module param in database. try use following code:
but doesn't want change param value in database (all time have value "0"). $params string correct within query, because if manually sql query works. what's wrong?
code: select all
if (!$params->get('is_installed'))
{
$db = jfactory::getdbo();
$params->set('is_installed', 1);
$sql = 'update '.$db->quotename('#__modules').' set params = \''.(string) $params.'\' where title = \'my module\'';
$db->setquery($sql);
$db->query();
// $params->get('is_installed') returns 1 - ok
}but doesn't want change param value in database (all time have value "0"). $params string correct within query, because if manually sql query works. what's wrong?
tried same thing today on joomla 1.5 - got same results.... nothing get's writen db 
any on ?
code: select all
$params = new jparameter(jmodulehelper::getmodule('syncusers'));
$params->set('lastupdated', date('y-m-d'));
any on ?
Comments
Post a Comment