$陣列=陣列 ( [型] =>數組 ( [0] =>當然 [1] =>當然 )如何在Zend框架中的數據庫表中存儲數組值?
[c_name] => Array
(
[0] => mca
[1] => bca
)
[year] => Array
(
[0] => 2013
[1] => 2010
)
[status] => Array
(
[0] => pursuing
[1] => completed
)
[entity_type_rm_id] => Array
(
[0] => 1
[1] => 1
)
)
我使用: 的foreach($陣列$行){ 如何創建此數組中的數據庫表來存儲? }
表名
entity_type_rm_courses
分
和表列
id | entity_type_rm_id | type | c_name | year | statue
我想設置值這樣
id | entity_type_rm_id | type | c_name | year | statue
--- ------------------- -------- -------- ------ ---------
1 | 1 | course | mca |2013 | pursuing
2 | 1 | course | bca |2010 | completed
我想用createRow()方法,在表
$courseRow = $courseTable->createRow($Course);
$courseRow->save();
$courseRow = $courseTable->createRow($Certification);
$courseRow->save();
什麼不工作?你的問題是什麼? – Iznogood