Yii Framework Forum: INSERT MASS RECORD IN DATABASE TABLE - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

INSERT MASS RECORD IN DATABASE TABLE How insert more than one row at a time in a same table ? Rate Topic: -----

#1 User is offline   Vip 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 30
  • Joined: 21-October 11
  • Location:Gwalior,India

Posted 04 November 2011 - 08:05 AM

Hello friends,

I m new here ....Can anyone please help me.? I want to insert more than one tuple (rows) in a same table on form submission. Is it possible in Yii ....Its most urgent please help me. Thanks in advance.
I have a table in database named trn_hiring_details. which have attributes case_no, Sy_no, village_name,area.
case_no is the foreign key I have a html table in form which will be getting information from user. so i hv to insert full table values to the my database table trn_hiring_details.
Vipul Arora
Gwalior
India,
0

#2 User is offline   Ivica 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 317
  • Joined: 25-May 11

Posted 04 November 2011 - 08:26 AM

Off course it is possible, you need just to add foreach loop, in which you would create model, assign post data to it, save model, and so on, until you save all your elements from post data.
Zurmo: Yii Powered Open Source CRM
zurmo.org
0

#3 User is offline   Vip 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 30
  • Joined: 21-October 11
  • Location:Gwalior,India

Posted 04 November 2011 - 08:37 AM

View PostIvica, on 04 November 2011 - 08:26 AM, said:

Off course it is possible, you need just to add foreach loop, in which you would create model, assign post data to it, save model, and so on, until you save all your elements from post data.



Thank you Ivica ....Can u give me an example ...of it will help me more. thank you ...
Vipul Arora
Gwalior
India,
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

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