// error_reporting(E_ALL & ~E_NOTICE); // error_reporting(E_ALL); include('includes/configureCV.php'); if ($_POST['procesar']) { if ($_POST['nPedido'] and $_POST['nPedido']==$_POST['nPedidoAnterior']) { /* tep_db_query("update ps_totsmartdelivery_hourstimeslot h join ps_totsmartdelivery_orders o on ". "h.id_totsmartdelivery_hourstimeslot=o.id_totsmartdelivery_hourstimeslot ". "set h.date='".$_POST['date_delivery']."',h.time='".$_POST['timeframe']."' where o.id_orders='".$_POST['nPedido']."'"); tep_db_query("update ps_totsmartdelivery_hourstimeslot h ". "set h.date='".$_POST['date_delivery']."',h.time='".$_POST['timeframe']."' ". "where h.id_totsmartdelivery_hourstimeslot =(select o.id_totsmartdelivery_hourstimeslot ". "from ps_totsmartdelivery_orders o ". "where o.id_orders='".$_POST['nPedido']."')"); */ tep_db_query("update ps_orders o set o.ddw_order_time = '".$_POST['timeframe']."', ddw_order_date = '".$_POST['date_delivery']."' where o.id_order='".$_POST['nPedido']."'" ); } $texto_query = "select date(o.ddw_order_date) date_delivery,o.id_cart,CONCAT(firstname,' ',lastname) nombreCliente, ". "CONCAT(a.address1,' ',a.address2) delivery_street_address,city,ddw_order_time timeframe,z.nombre,z.telefono ". "from ps_orders o join ps_address a on (a.id_address=o.id_address_delivery) " . "left join ps_orders1 o1 on (o.id_order=o1.id_order) ". "left join ps_zona_repartidor z on (o1.idRepartidor=z.idRepartidor)". "where o.id_order='".$_POST['nPedido']."' "; //echo $texto_query; $status_query = tep_db_query($texto_query); $status_values = tep_db_fetch_array($status_query); } ?>