· 7 years ago · Nov 14, 2018, 10:10 PM
1$inserir = $crud->insert('movimentacao', 'descricao = ?, data = ?, mes = ?, ano = ?,
2 valor = ?, forma_pagamento = ?, status_pagamento = ?, tipo = ?, cod_id_tipo = ?,
3 idconta = ?, idcliente = ?, fixa = ?, recorrencia = ?, anexo = ?', array(
4 $descricao, $data, $data_aux[1], $data_aux[0], $valor, $forma_pagamento,
5 $status_pagamento, 'R', $cod_id_tipo, $idconta, $idcliente, 0, $recorrencia, 'sem anexo'
6 ));
7
8 //tabela
9
10
11CREATE TABLE IF NOT EXISTS `movimentacao` (
12 `id` int(11) NOT NULL DEFAULT '0',
13 `descricao` varchar(255) NOT NULL,
14 `data` date NOT NULL,
15 `data_confirmacao` date NOT NULL,
16 `mes` int(11) NOT NULL,
17 `ano` int(11) NOT NULL,
18 `valor` decimal(12,2) NOT NULL,
19 `forma_pagamento` varchar(90) NOT NULL,
20 `status_pagamento` int(11) NOT NULL COMMENT '0 = pendente, 1 =confirmado',
21 `tipo` varchar(20) NOT NULL,
22 `cod_id_tipo` int(11) NOT NULL,
23 `idconta` int(11) NOT NULL,
24 `idcliente` int(11) NOT NULL,
25 `fixa` int(11) NOT NULL,
26 `recorrencia` int(11) NOT NULL,
27 `anexo` varchar(255) NOT NULL
28) ENGINE=InnoDB DEFAULT CHARSET=latin1;