[eluser]snakeblu[/eluser]
Hi everybody,
I have the following code:
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']);
}
The problem is that this code updates only one row even though the array ($data['option']) contains more than one options.
If I add a sleep inside foreach and after the query (for example sleep(3)) the code performs X query, where X is the lenght of array.
It could be a bug?
(sorry for my bad english)
Thanks
Regards
Mauro