我想知道如何处理在 joomla 中使用约束创建的 mysql 表。例如,
theater_table
id , name, description, image, address, tel, fax ,email
theater_facility_table
id, theater_id, facility_id
facility_table
id, name, description, image
设施表已经填满了数据,id 是主键。在创建剧院时,我正在为其添加设施。我创建了设施和剧院 JTables。
我也必须创建 theatre_facility JTable 吗?
使用剧院模型类如何将数据插入到剧院设施表中。我知道我可以在剧院存储成功创建并调用 storeTheaterFacility() 方法后插入数据,其中包含插入查询以保存所需信息。但我觉得这不是一个好方法。请帮我解决这个问题。