Questions tagged as 'sql-insert'

1
answer

java.lang.NullPointerException: Attempt to invoke virtual method on a null object reference

I'm trying to insert some values in the database, but it's always giving an exception. My class that enters the bank: private String email; private int codigo; private Button btnOkay; private Button btnCancelar; private EditText codigoConf...
asked by 03.06.2016 / 07:00
4
answers

Error saving form data in php

I'm having trouble passing data from an html form to be rendered in a .php file No error message. ' <html> <head> <title>Cadastro</title> </head> <body> <form method="POST" action="cadastro_aluno_e...
asked by 31.08.2015 / 21:14
1
answer

Doctrine Insert in many-to-Many unidirectional relation

I have the following situation: In my Location entity: /** * @ORM\ManyToMany(targetEntity="Contato") * @ORM\JoinTable(name="contato_localidade", * joinColumns={@ORM\JoinColumn(name="localidade_id", referencedColumnName="identificad...
asked by 17.03.2015 / 15:14
1
answer

Error Code: 1048, SQL State: 23000 Column 'colegiado_id' can not be null

Hello, this error "[Error Code: 1048, SQL State: 23000] Column 'colegiado_id' cannot be null" It happens when I try to run the SQL command below directly in MySQL: start transaction; INSERT INTO EspecialistasColegiados (colegiado_id, esp...
asked by 04.03.2015 / 22:06
1
answer

CodeIgniter does not register

I'm trying to insert some data into the bank but I can not. Some problem in the array that CodeIgniter returns. The following is the Controller that the form calls: function cadastrar() { $this->load->helper('array'); $da...
asked by 02.10.2014 / 15:29
1
answer

MYSQL connection error on Android using php

I'm trying to connect my Android Java application via php with my MYSQL database and insert data into it, but despite the Android application reporting that the "user was successfully registered" the data I try to insert does not appear in the d...
asked by 10.12.2018 / 13:28
0
answers

How to use bind_param without repeating variables

This code here inserts the parcels of a payment, the m1, m2, m3 and etc are variables that add a month to the current date, for example $m1 = date('Y-m-d',strtotime("+1 month")); $stmt20 = $conexao->prepare(" INSERT INTO esc_...
asked by 07.12.2018 / 15:52
1
answer

How to leave NULL if $ _POST is empty in the MySQL database?

Is there any way I can leave fields that have not been filled as null ? When creating the table, the fields have already been defined as DEFAULT NULL , but when doing insert - in the MySQL database - by $ _ POST , the fields that wer...
asked by 18.10.2018 / 20:00
1
answer

ignore existing lines in the bank, in php file import

I have the following line of code that performs the import of the txt file. <?php function Inserir($itens, Pdo $pdo){ $sts = $pdo->prepare("INSERT INTO dados(loja, cod_prod, cod_acesso, desc_prod, estoq_disp, data, estoq_valida...
asked by 23.10.2018 / 16:43
0
answers

Insert in SQLiteDatabase executes but does not insert into the database

Hello, I have an application in android studio that connects to an external SQLite database and is stored in the Assets of my project. In order for me to be able to use this external database within Assets, I needed a class named SQLiteAs...
asked by 10.09.2018 / 15:29