Jump to content

new field in ps_cms_lang table


milan.bartovic

Recommended Posts

Hi !

How can I store new date_upd field into the ps_cmd_lang table?
I created new field via myphpadmin with type 'DATE'. But I can not get it running. I have updated 'AdminCMS.php' so the date is displayed with default 'date("Y-m-d")' value, but the value is not stored to the database.

In fact, I can not find the place where sql INSERT command is executed over ps_cms_lang table.

In which file / function is the INSERT executed?

What shall I do to pass the date_upd value to that command?

Any tutorial, guide, knowledge, hint or clue would be welcome.

If you need more data, just ask.

Thanx.

Link to comment
Share on other sites

You need to add the date to the cms table.

ALTER TABLE `ps_cms` ADD `date_upd` datetime;
UPDATE `ps_cms` SET `date_upd` = NOW()



Then edit the "classes/CMS.php" file.

Find:

    public $active;



Replace with:

    public $active;
   public $date_upd;



Find:

        $fields['active'] = (int)($this->active);



Replace with:

        $fields['active'] = (int)($this->active);
       $fields['date_upd'] = pSQL($this->date_upd);

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...