user3337590
user3337590

Reputation: 160

Save custom column value in database using component in joomla JModelAdmin

I am new to joomla and working on one component. I want to create an additional column in database. For that I have created column in database table. And also added it in html form. But in controllers function save doesn't save. I have tried like this

$validData = $model->validate($form, $data);
$validData["ratehr"] = 45;
if (!$model->save($validData)) {...... 

"ratehr" is new column in database table. But this didn't save "ratehr" value in table rest all values saved successfully. What I am missing or need to add code in somewhere else. Thanks

Upvotes: 0

Views: 108

Answers (1)

Muhammad Ali Hassan
Muhammad Ali Hassan

Reputation: 962

You have to check administrator/tables/"yourtableclass". In this class you have to assign this new column.

Upvotes: 1

Related Questions