![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
15/09/2009, 05:09
|
![Avatar de hoberwilly](http://static.forosdelweb.com/customavatars/avatar246730_1.gif) | | | Fecha de Ingreso: julio-2008 Ubicación: Lima - Perú
Mensajes: 769
Antigüedad: 16 años, 7 meses Puntos: 2 | |
Respuesta: Consulta...tengo un array($carro) y quiero hacerlo un insert Hola abimaelrc y muchas por tu ayuda que me brindas,
A lo sugerido, una vez creado el foreach:
<?php
foreach($carro as $v){
echo $v["id"] . " " . $v["precio"] . " " . $v["cantidad"] . "<br />";
}
como realizaria el INSERT para mi tabla detalle fac???
INSERT INTO detallefac(IDDETFAC,CODPDTO1,CANTPDTO1,PRECPDTO1,C ODPDTO2,CANTPDTO2,PRECPDTO2)
VALUES(' ',$codigo1,$cantidad1,$precio1,$codigo2,$cantidad2 ,$precio2)
p.d. la estructura de mi tabla detallefac es la sgte:
IDDETFAC int(6) UNSIGNED ZEROFILL No auto_increment
IDFAC int(6) No
CODPDTO1 int(5) No
CANTPDTO1 char(3) latin1_swedish_ci No
PRECPDTO1 decimal(7,2) No
CODPDTO2 int(5) No
CANTPDTO2 char(3) latin1_swedish_ci No
PRECPDTO2 decimal(7,2) No
Saludos, |