• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Insert auto multiple row in database

Please would you help me  How to Insert auto multiple row in database?
have tried but fail .

Perhaps if you try explaining (in much more detail) what you're trying to do, we can help.

PHP Code:
$data = array(
'title' => 'My title',
'name' => 'My Name',
'date' => 'My date'
'title' => 'Another title',
'name' => 'Another Name',
'date' => 'Another date'


Above from the docs.
(You have to scroll down a bit to the end of that section).

1. Get your data together however you want (from a form input, from a curl, from an admin screen etc)
2. Create your multi dimensional array.
3. Use update_batch to insert multiple rows.

Easy peasy. Lightweight. Fast. Powerful. Flexible. As most things CI are :-)

Hope that helps.


PS You would get a more specific answer if you posted what you had "tried and failed". (What did you try? What did you expect? What did you get?)

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.