• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mysql insert not working properly

#11
[eluser]CroNiX[/eluser]
Code:
//Single insert using single array
$data = array(
    'product_column' => $product,
    'cat_id_column'  => $cat_id
);

$this->db->insert('table_name', $data);
Code:
//Multiple insert using an array of arrays
$data = array(
  array(
    'product_column' => $product2,
    'cat_id_column'  => $cat_id2
  ),
  array(
    'product_column' => $product,
    'cat_id_column'  => $cat_id
  ),
  array(
    'product_column' => $product3,
    'cat_id_column'  => $cat_id3
  )
);

$this->db->insert_batch('table_name', $data);


Messages In This Thread
Mysql insert not working properly - by El Forum - 08-08-2012, 11:46 AM
Mysql insert not working properly - by El Forum - 08-08-2012, 12:24 PM
Mysql insert not working properly - by El Forum - 08-09-2012, 05:10 AM
Mysql insert not working properly - by El Forum - 08-09-2012, 06:27 AM
Mysql insert not working properly - by El Forum - 08-09-2012, 07:18 AM
Mysql insert not working properly - by El Forum - 08-09-2012, 08:24 AM
Mysql insert not working properly - by El Forum - 08-09-2012, 08:45 AM
Mysql insert not working properly - by El Forum - 08-09-2012, 08:48 AM
Mysql insert not working properly - by El Forum - 08-09-2012, 08:52 AM
Mysql insert not working properly - by El Forum - 08-09-2012, 08:54 AM
Mysql insert not working properly - by El Forum - 08-09-2012, 09:14 AM
Mysql insert not working properly - by El Forum - 08-09-2012, 09:22 AM
Mysql insert not working properly - by El Forum - 08-09-2012, 09:23 AM
Mysql insert not working properly - by El Forum - 08-09-2012, 09:26 AM
Mysql insert not working properly - by El Forum - 08-09-2012, 09:30 AM
Mysql insert not working properly - by El Forum - 08-09-2012, 09:31 AM
Mysql insert not working properly - by El Forum - 08-09-2012, 09:37 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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