[eluser]bproctor[/eluser]
I'm not sure I understand exactly, but it sounds like you have a form with multiple rows, and three columns, the seller, number of sales and number of clients and you want to fill all these out and click submit and have all those rows be inserted into the database...
Code:
<?php for ($i = 0; $i < 20; $i++) : ?>
<select name="seller[]">
<?php foreach ($sellers as $seller) : ?>
<option value="<?php echo $seller->id; ?>"><?php echo $seller->name; ?></option>
<?php endforeach ?>
</select>
<input type="text" name="num_sales[]" />
<input type="text" name="num_clients[]" />
<?php endfor ?>
Then simply insert the entire post array into the database...
Code:
$this->db->insert_batch('my_table', $this->input->post());
Or if you need to have finer control over the data going into the database you could run it though a loop, something like this...
Code:
$post = $this->input->post();
for ($i = 0; $i < count($post['seller']; $i++) {
$this->db->insert('my_table', array('seller_id' => $post['seller'][$i], 'num_sales' => $post['num_sales'][$i], 'num_clients' => $post['num_clients'][$i]));
}