Ver Mensaje Individual
  #5 (permalink)  
Antiguo 31/08/2015, 20:06
rtel
 
Fecha de Ingreso: junio-2015
Mensajes: 5
Antigüedad: 8 años, 10 meses
Puntos: 0
Respuesta: No graba registros en base de datos

Estimado Pateketrueke:

Muchas gracias por responder e interesarte en buscar una solución, lamentablemente soy nuevo en el foro y no supe como encerrar el mensaje original en etiquetas highlight

pero segui intentando buscar soluciones, al final lo que hice fue insertar un registro manualmente en PhpMyadmin y al hacerlo me mostro el codigo de insercion, copie este antes de mi sentencia

$sql= "INSERT INTO factura (etc..etc)

y comence a remplazar los valores por mis valores obtenidos por $_POST.. y me grabo...

lo que cambio del codigo fue lo siguiente:

CODIGO ORIGINAL

$sql = "INSERT INTO `factura`
('concepto', 'cliente', 'fecha', 'rnc', 'ncf', 'subtotal', 'impuestos', 'total', 'ci')
VALUES
({$this->concepto}',
'{$this->cliente}',
'{$this->fecha}',
'{$this->rnc}',
'{$this->ncf}',
'{$this->subtotal}',
'{$this->impuestos}',
'{$this->total}',
'{$this->ci}');";


POR ESTE CÓDIGO QUE ME DIO LA INSERCIÓN DEL PRIMER REGISTRO EN FORMA MANUAL:

$sql= "INSERT INTO `facil`.`factura` (`concepto`, `fecha`, `cliente`, `rnc`, `ncf`, `subtotal`, `impuesto`, `total`, `ci`) VALUES ('{$this->concepto}', '{$this->fecha}', '{$this->cliente}', '{$this->rnc}', '{$this->ncf}', '{$this->subtotal}', '{$this->impuestos}', '{$this->total}', '{$this->ci}')";


El resto estaba todo bien, y al hacer este cambio todo resulto de manera correcta y ahora graba los registros en la tabla factura..

Altamente agradecido de tu persona

Rtel