Several tables in JTable of joomla 2.5

谁都会走 提交于 2019-12-04 16:33:38

Joomla is not designed to work that way. You are meant to use one table file per database table.

In your model you can instantiate all three tables if needed, but each table file should be separate.

In your model do the following:

 $tableCode = JTable::getInstance('Code', 'HelloWorldTable');
 $tableFairinfo = JTable::getInstance('Fairinfo', 'HelloWorldTable');
 $tableHotelinfo = JTable::getInstance('Hotelinfo', 'HelloWorldTable');

Then you can:

 $tableCode->load($id);

or

 $tableHotelinfo->delete($id); 

etc;

But instead of messing about with all of this, why don't you give the component creator a try?

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!