I am trying to save to a table with the following custom code on On Submit which should work.
//$record is an array with matching parameters to a structure of a table
$row =& JTable::getInstance('tvs5y_custom_app1_employment_history', 'Table');
$row->bind($record);
$row->store();
However it does not save but prints this error message:-
Table tvs5y_custom_app1_employment_history not supported. File not found.
However if I use DBSave I can load this table without any problem.
Do you have to set something up beforehand to tell where JTable to look? I thought it was able to get any table from the default database. What I don't understand if I can get this table with DBSave why not JTable as well?
//$record is an array with matching parameters to a structure of a table
$row =& JTable::getInstance('tvs5y_custom_app1_employment_history', 'Table');
$row->bind($record);
$row->store();
However it does not save but prints this error message:-
Table tvs5y_custom_app1_employment_history not supported. File not found.
However if I use DBSave I can load this table without any problem.
Do you have to set something up beforehand to tell where JTable to look? I thought it was able to get any table from the default database. What I don't understand if I can get this table with DBSave why not JTable as well?