How to update module param in the database? - Joomla! Forum - community, help and support


i update module param in database. try use following code:

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 :(

code: select all

$params = new jparameter(jmodulehelper::getmodule('syncusers'));
$params->set('lastupdated', date('y-m-d'));


any on ?





Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support