I got a little problem: I would like to create a form, which content is saved into 2 databases.
Field1 -> #__table_1 Field2 -> #__table_2
I'm doing this by extending the save-method in my model, which works fine.
But: In my
JTable::store-method I'm checking the inputs of the user and sometimes I modify other fields according to the value of a specific field. Because not all values are stored in $this (because the fields do not exist in
#__table_1) I have to work with
$jinput to get these values.
Well - now I got a problem: I would like to create items by CLI doing this:
$data['id'] = NULL; $data['field1'] = JFactory::getDate();; $data['field2'] = $json; // Lets store it! $row = JTable::getInstance('Ticket','BestiaTable'); $row->bind($data); $row->check(); $store = $row->store(); if($store == true) return $row->id; else return false;
This does not work because during
bind() the values that do not exist in
#__table_1 are not available for store-process.
How can I change that? How can I push
field2's value to the store-method?