Yii Framework Forum: yii 由表1批量插入數據到新的表2 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

yii 由表1批量插入數據到新的表2 Rate Topic: -----

#1 User is offline   wlkmf 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 11-January 14

Posted 29 December 2015 - 09:42 PM

请问下各位,以下情况yii是怎样实现?

我有2个表:
表1. 学生职务(studentPosition)
id, studentID, positioned,
表2. 学生职务评分(positionMark)
id, studentPositionID, mark1, mark2, mark3, create_user_id
2个表的关系是1对多

当老师登入系统时会根据表1列出所有学生的职务,然后填上分数,按 “提交”之后,数据会插入表2。(另外可以做到新记录就插入表2,旧记录就更新表2吗?)

现时我遇到的问题是如何从表1批量汇入到表2,请问有例子可以参考吗?
批量更新(batchupdate)我就会
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users