Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $this->con->beginTransaction();
- try {
- $stmt = $this->con->prepare(
- 'INSERT INTO sedoc.proc_dest(id_categoria, ci)'
- . ' VALUES (:categoria, :ci)'
- );
- $stmt->bindValue(':ci', trim($procdestModel->getCI()));
- $stmt->bindValue(':categoria', $categoria);
- $stmt->execute();
- $ultimo = $this->con->lastInsertId('proc_dest_id_proc_dest_seq');
- this->con->commit();
- return $ultimo;
- } catch (Exception $e) {
- $this->con->rollBack();
- Message::setMessage('registro', 'Error!', 'error');
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement