INSERT command in php is not working [closed]

0

I'm passing a PHP project I made on the local server to a paid server. When I was using only the location of my machine, everything worked. But when the whole program was passed to the new server, the problem appeared. I am using the PostgreSQL database, and when trying to execute an INSERT command, to insert the data in the DB, the message that has been registered but not registered in the DB appears. The DELETE and UPDATE commands are working normally. Follow the code

$inserir = $pdo->prepare("INSERT INTO produtos values (nextval('produto_id_seq'::regclass),:nome, :preco,:tipo,  :imagem, :medida, :observacao);");
                        $inserir->bindParam(':nome', $nomeprod, PDO::PARAM_STR);
                        $inserir->bindParam(':preco', $preco, PDO::PARAM_STR);
                        $inserir->bindParam(':tipo', $tipo, PDO::PARAM_STR);
                        $inserir->bindParam(':imagem', $novoNome, PDO::PARAM_STR);
                        $inserir->bindParam(':medida', $medida, PDO::PARAM_STR);
                        $inserir->bindParam(':observacao', $observacao, PDO::PARAM_STR);
                        $inserir->execute();
    
asked by anonymous 25.08.2016 / 20:27

1 answer

1

The problem was only in the same privilege, as said. I asked the provider to release it for me (I could actually have released that privilege myself), and it worked. Thank you for your attention.

    
29.08.2016 / 19:38