Выдает следующую ошибку.
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 6 in Z:\home\localhost\www\gamelist\cart_fns.php on line 51
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 9 in Z:\home\localhost\www\gamelist\cart_fns.php on line 51
Все пересмотрел вроде чисто, в каком направлении искать?
Вот функция откуда идет ошибка.
PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- function total_price($cart)
- {
- $price = 0.0;
- $connection = db_connect();
- {
- foreach($cart as $id => $qty)
- {
- $query = "select price from products where products.id = '$id'";
- if($result)
- {
- $price += $item_price * $qty;
- }
- }
- }
- return $price;
- }