DMXzone Database Updater PHP Support Product Page
Insert multiple records
 Asked  01 Jan 2017  17:10:38 
  1 
     has   this question  
  01 Jan 2017  17:10:38 manuel pinto posted: 
 Is there an easy way to insert multiple records on a database?  Replies
 Replied 03 Jan 2017  08:25:10 
   03 Jan 2017  08:25:10 Teodor Kuduschiev replied: 
  Hi Manuel,
With server connect it is always easy to do any kind of insert. What exactly are you trying to achieve? Where is the insert data coming from? How are you planning to insert it?
  With server connect it is always easy to do any kind of insert. What exactly are you trying to achieve? Where is the insert data coming from? How are you planning to insert it?
 Replied 03 Jan 2017  11:20:13 
   03 Jan 2017  11:20:13 manuel pinto replied: 
  I have a form with 4 fields. Data from these fields are inserted on a table (database). I wish to create some kind of a repeat region where the user could insert several results at the same time with only one submission. At the moment user must submit  for example 10 times the same form. If the user could choose (from a combo box for example) how many repeate regions he want that will be excelent.
A tutorial on this will also be very nice
  A tutorial on this will also be very nice
 Replied 03 Jan 2017  11:24:35 
   03 Jan 2017  11:24:35 Teodor Kuduschiev replied: 
  Are the 4 fields inserted as a single record or are these 4 different records?  
   Replied 03 Jan 2017  12:13:35 
   03 Jan 2017  12:13:35 manuel pinto replied: 
  The 4 fields are inserted as a single record. What i need is to insert more records (single) at the same time in a unique submission 
   Replied 03 Jan 2017  12:19:37 
   03 Jan 2017  12:19:37 Teodor Kuduschiev replied: 
  Ok, so should the same data be inserted (more than once) ? Example, user enters [data1][data2][data3][data4] in the fields, and should this be inserted X times (whatever is selected in the dropdown)? 
   Replied 03 Jan 2017  12:43:52 
   03 Jan 2017  12:43:52 manuel pinto replied: 
  Exactly, but not the same data!
By dafault the form has this fields:
[data1][data2][data3][data4]
If the user choose to insert more data, with diferent information, lets say more 2 times he could insert that in a single submission:
[data1][data2][data3][data4]
[data1][data2][data3][data4]
[data1][data2][data3][data4]
I think i have to create a repeat region with for example more 3 "lines" with the form fields, so this correspond to insert multiple records on a database
The dropdown could be nice because the user could define how many records he want to insert. If i have not this function, i have to build by default for example 3 repeat region with the form fields.
  By dafault the form has this fields:
[data1][data2][data3][data4]
If the user choose to insert more data, with diferent information, lets say more 2 times he could insert that in a single submission:
[data1][data2][data3][data4]
[data1][data2][data3][data4]
[data1][data2][data3][data4]
I think i have to create a repeat region with for example more 3 "lines" with the form fields, so this correspond to insert multiple records on a database
The dropdown could be nice because the user could define how many records he want to insert. If i have not this function, i have to build by default for example 3 repeat region with the form fields.
 Replied 03 Jan 2017  13:08:29 
   03 Jan 2017  13:08:29 Teodor Kuduschiev replied: 
  Ok but does that mean that you want to dynamically create more fields on the page(depending on the dropdown value) so the user can insert different data? Should there be only one row of fields initially? 
   Replied 03 Jan 2017  13:54:50 
   03 Jan 2017  13:54:50 manuel pinto replied: 
  That is correct! 
   Replied 12 Jan 2017  21:39:57 
   12 Jan 2017  21:39:57 manuel pinto replied: 
  Any news on this ? 
  