Welcome Guest, Not a member yet? Register   Sign In
Multiple update query
#2

[eluser]Mark LaDoux[/eluser]
[quote author="snakeblu" date="1341938754"]
Code:
foreach ($data['option'] as $option){
   echo $option['product_option_value'];
   $this->db->query('UPDATE product_option_value SET quantity = (quantity - 1) WHERE product_option_value_id = ' . $option['product_option_value']);
}
[/quote]

You could try flushing the query cache after every operation like so, let me know if that helps.
Code:
foreach ($data['option'] as $option){
   echo $option['product_option_value'];
   $this->db->query('UPDATE product_option_value SET quantity = (quantity - 1) WHERE product_option_value_id = ' . $option['product_option_value']);
$this->db->flush_cache(); // flush the query from the cache after running it
}


Messages In This Thread
Multiple update query - by El Forum - 07-10-2012, 09:45 AM
Multiple update query - by El Forum - 07-10-2012, 03:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB