Questions tagged as 'sql-insert'

1
answer

Insert into two tables in SQLite Android

How do I add data in two tables on Android in a single transaction? I have two Client and Address tables, the latter with a foreign key referencing the client table, and it must be registered in a single transaction. I know that MySQL has the...
asked by 29.06.2014 / 08:08
2
answers

Insert data into XAMPP database with php

I need to insert the data that the user puts in the web page to the XAMPP database, but I can not get someone to help me? Code of the page where the data is placed: <label>Nome Produto : </label> <input type=text size=70 name...
asked by 23.05.2018 / 14:03
1
answer

Error: "Column count does not match value count at row 1" when inserting value in table with trigger

After creating trigger : DELIMITER # CREATE TRIGGER BACKUP_PRODUTO_INS AFTER INSERT ON PRODUTO FOR EACH ROW BEGIN INSERT INTO BACKUP.BKP_PRODUTO VALUES(NULL, NEW.IDPRODUTO, NEW.NOME, NEW.VALOR, 'I'); END # DELIMITER ; DESC of the...
asked by 15.03.2018 / 04:13
2
answers

Perform Insert for a defined amount (PHP)

Hello, Personal, I want an action to be performed over a certain amount of times defined through a form. For example: The user chooses 5, then the code exempts 5 records in the database. Since each record must be incremental, for example,...
asked by 15.12.2017 / 17:09
1
answer

How to insert only elements that do not exist?

I have a python script that looks for elements of one database and saves it in another, so when I run the script it is duplicating the data. sql = "INSERT INTO 'alarm' ('data', 'seconds', 'culprit', 'status') VALUES (%s, %s, %s, %s) Is ther...
asked by 30.10.2017 / 15:48
1
answer

Error trying to insert data via JSF form- BEAN error

I'm starting to create a WEB application using JSF, however I try to insert some data through a form and the error below is displayed:    /usuario.xhtml @ 19.72 value="# {BlueEmail user"): Target   Unreachable, identifier 'userBean' resolved...
asked by 24.09.2016 / 03:25
2
answers

SELECT INSERT in Oracle using sequence nextval and group by

Good morning, guys! I'm trying to do a select insert in Oracle using a SEQUENCE in the id, but it's giving error on account of a group by in select. Dry my SQL: INSERT INTO SUP_T(ID, DESCRICAO) SELECT SEQ_SUP_T.NEXTVAL,TIPO.TIPO F...
asked by 04.07.2016 / 13:59
2
answers

How to verify in the database if the cadastre has already been made PDO

How do I check if id of the user no longer has a record in the database and continue with insert ? if(isset($_POST['submit'])){ $comment = trim(strip_tags($_POST['comment'])); $insert = "INSERT into tb_comment (id_mark,...
asked by 10.12.2015 / 22:46
3
answers

Insert date into MySQL via PHP

I want to insert a FORM in HTML that made the field DATE , however it is in the format dd/mm/yyyy and mysql only accepts yyyy-mm-dd . How do I convert a date to insert correctly in MySQL database using PHP? I tried to find...
asked by 29.07.2014 / 17:03
3
answers

Save auto_increment id of a table in another table in the same file

I want the ID automatically generated in auto_increment in the wpne_posts table to be saved to another table named wpne_postmeta The INSERT code for the first action is: mysqli_query($con, "SELECT * FROM wpne_posts"); $sql1 = "...
asked by 15.08.2018 / 20:23