Ver Mensaje Individual
  #5 (permalink)  
Antiguo 11/09/2006, 06:49
Avatar de Kalili
Kalili
 
Fecha de Ingreso: enero-2002
Ubicación: Gate 69
Mensajes: 210
Antigüedad: 22 años, 4 meses
Puntos: 0
mira he hecho como tu decias
Código PHP:
<?php
    
include("invoice_mail.php");
    
session_start();

        
//$srt_sql ="delete from cart where IDCOOKIE = '" . GetCartId() . "'";
        //mysql_query($srt_sql) or die("Error en el query $str_sql... Mysql dice: ".mysql_error());
        
$sql mysql_query("select max(idorder) from orders where IDKLANT='".$_SESSION['login_session']['idklant']."'");
        
$row mysql_fetch_row($sql);
        
$idorder =$row[0];
        
$status ="OK";
        
mysql_query("update orders set STATUS = '$status' where IDORDER = '$idorder'");
        
        
        
$sql mysql_query ("select * from cart inner join products on cart.IDPRODUCT = products.IDPRODUCT where cart.IDCOOKIE = '" GetCartId() . "");
        while (
$row mysql_fetch_row($sql)){
        
$idproduct $row["IDPRODUCT"]; 
        
$newstock $row["STOCK"] - $row["QTY"];
        
mysql_query ("UPDATE products SET STOCK = '$newstock' WHERE IDPRODUCT = '$idproduct'"); 
        } 
?>
pero me da este error

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/httpd/vhosts/linse-webshop.nl/httpdocs/succes.php on line 15
__________________
saludos