Questions tagged as 'sql-insert'

1
answer

Insert in SQL if registration does not exist [duplicate]

I have the following PHP function that adds a row to the table: $idmusica = $_GET['idmusica']; $queryvota=(" INSERT INTO euk_sugestoes_votos (idusuario, idmusica) VALUES ($userid, $idmusica) "); The table has this structure:...
asked by 23.04.2018 / 23:25
2
answers

Insert multiple items with the same Sql sever Sql

Hello How can I insert multiple items into a single ID Primarykey autoincrement There will still be columns of IDproducts where I want to insert multiple items into a RequestID as I do so I've tried with update plus it will override the pr...
asked by 02.11.2017 / 18:24
2
answers

Write to the bank who edited the profile

I am developing a system that registers employees of companies. In this system I have the employee and user tables. Employees table I have the data id|nome|empresa|data_cadastro|user_view|user_edit User table I have the data...
asked by 15.08.2017 / 21:04
3
answers

Columns do not hit insertion

You're giving an error    Column count does not match value count at row 1     
asked by 20.08.2017 / 21:25
1
answer

Registration in foreach php

Alright? I am trying to register several records in the bd according to the number of parcels requested, but I am not able to. My code: php: $Conn = parent::getConn(); try { foreach ($this->Data as $pr): $Query =...
asked by 03.07.2017 / 22:06
1
answer

How to get the auto increment ID using MySQL and PHP and use it later? [duplicate]

I'm creating an API in PHP and insertion. I need to get the ID created in this INSERT and use it later. What I find of material seems not to be recommended. Any solution? Thank you. My PHP: <?php header('Access-Control-Allow-Origi...
asked by 25.01.2017 / 13:34
1
answer

Problem in performing a Java language INSERT

Hello everyone, I have a problem that I think should be very easy but as I am new to it, it is not rs, I have an insert to perform in a class called ClienteDAO follow the code below: public class clienteDAO { public void Create(clie...
asked by 23.12.2016 / 20:03
3
answers

insert multiple records checkbox mysql

I'm trying to insert information into multiple checkbox information at once, for example a news item is related to more than one category, so I just select the categories and save, but this is giving this error, Notice: Array to string convers...
asked by 15.07.2016 / 03:51
2
answers

Error when inserting in bank with PHP

I am trying to insert data into MySQL, no error appears but does not enter the values in the database. <?php INCLUDE "conexao.php"; if (isset($_POST["submit"])) { $cod_produto = $_POST['cod_produto'];...
asked by 12.09.2015 / 03:57
2
answers

Insert procedure into three tables

Hello everyone, I am trying to change a procedure that I created to insert a new book into three tables. The table has autoencrement in the book_id column, and tables B and C are not null, I am using @@ IDENTITY to get the last value of table_id...
asked by 05.12.2018 / 12:03