Questions tagged as 'sql-insert'

1
answer

Ajax warns success but does not enter data

I already did an insert without using ajax and it worked normal, when I used ajax and returned success I thought it was all right, but when I went to look at the database the data was not there Running JS Code function adicionaUsuario(){ va...
asked by 20.10.2016 / 05:58
1
answer

Form making insert empty

Good morning,   Could you help me identify what is wrong with my form or the insert that is saving empty records in the database.    INSERT: alert (\ 'Note successfully signed !! \'); parent.location = \ 'index.php \'; '; ? >    FOR...
asked by 26.04.2016 / 16:35
0
answers

Enter data by PHP

After submitting the form I do the following: $n_processo = $_POST['n_processo']; $nome = $_POST['nome']; $dia = $_POST['dia']; $mes=$_POST['mes']; $ano = $_POST['ano']; $data = $dia."-".$mes."-".$ano; $cc = $_POST['cc']; $cu...
asked by 10.04.2016 / 20:40
1
answer

Calling methods from another class

In case I need to call a method of another class to perform an insertion in the database and I have to pass an object of type Usuario as a parameter Code: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedI...
asked by 22.08.2015 / 02:13
1
answer

Write to two or more MySQL tables

Doing this with two or more separate inserts in the same function is simple, but is there any more correct way to consume the least amount of resources? In the platform that we are working on, all user actions will be saved in other tables and l...
asked by 17.09.2015 / 18:57
2
answers

I can not insert into related tables

I'm in trouble. I normally enter in the table "equipment" of my code and populate normally the BD mysql. However, the "dell" table is empty even though it passes the ID reference from the "equipment" table. By phpmyadmin everything is working...
asked by 24.07.2014 / 18:51
1
answer

Error inserting image into folder

I am inserting an image into the Database. In the database, only the name of the image is saved, and the image is stored in a folder. $target_dir = "./uploads/"; $target_file = $target_dir . basename($_FILES["image"]["name"]); $uploadOk = 1;...
asked by 19.06.2018 / 12:24
1
answer

I am not understanding this error [closed]

My PHP code: <?php include "conectar.php"; //comando para iserir dados direto do formulário para o banco de dados $vnome=$_POST['nome']; $vcpf=$_POST['cpf']; $videntidade=$_POST["identidade"]; $vtelefone=$_POST["telefone"]; $vcelular=$_...
asked by 21.10.2017 / 03:56
4
answers

How do I do a SELECT then an INSERT [closed]

How do I do a SELECT and if it returns more than 1 record does the UPDATE and if it returns 0 records does the INSERT? Look how I've done here but it's not working: if(isset($_POST['submit'])){ $query = $conexao->prepare("SELECT id_m...
asked by 15.12.2015 / 21:19
2
answers

INSERT PHP MYSQL does not insert [closed]

I have a simple problem with INSERT on PHP with MYSQL , it happens that it does not insert anything in the database, I already put it to report the errors but it does not work, I'm using vertrigo server The code is this:...
asked by 25.06.2016 / 20:34