Re: Error to insert in firebird

From: Date: Tue, 05 Nov 2013 18:34:22 +0000
Subject: Re: Error to insert in firebird
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-322429@lists.php.net to get a copy of this message
----- Original Message ----- From: Tsvetan Nikolov To: Ismael L. Donis Garcia Cc: PHP-General Sent: Tuesday, November 05, 2013 12:45 PM Subject: Re: [PHP] Error to insert in firebird Do you commit your transaction? Yes
The complete function is: public function actualizar($sql,$param){ if ($this->cn){ //for example: $sql = "insert into scele (codigo, nombre) values (?, ?)"; $param = "1, Test1"; $tr = ibase_trans(IBASE_WRITE,$this->cn); $qr = ibase_prepare($tr,$param); $this->rs = ibase_execute($sql,$param); if ($this->rs){
     //Evaluate this condition, but he does not enter here
     ibase_commit($tr);
} else {
     ibase_rollback($tr);
     return array('tipo'=>false,'texto'=>'Error de ejecusión: ' .ibase_errmsg());
} ibase_free_query($qr); return array('tipo'=>true,'texto'=>''); } else { return array('tipo'=>false,'texto'=>'Error de conexión: ' .ibase_errmsg()); } } Best Regards ======== | ISMAEL | ========

« previous php.general (#322429) next »