Questions tagged as 'sql-insert'

0
answers

insert into two tables at the same time with php [duplicate]

I'm in trouble. I have the usuario and aluno tables that are related by primary and foreign key. I want to make an insert with php to insert data into the two tables, and the idusuario of the usuario table sh...
asked by 23.05.2017 / 20:38
1
answer

Inserting data with PHP using classes and PDO

Good evening everyone. I have the task of creating a complete CRUD on the site where I work. However I need to use classes and methods with PHP. See what happens. I have class usuario.class , where I put all attributes and methods Ge...
asked by 02.06.2017 / 03:11
1
answer

Error 1452 Mysql

I'm starting mysql, so do not look at bad tables. Anyway I have the following tables: create table Alunos ( MAT int, nome varchar (45), endereco varchar (45), cidade varchar (45), constraint primary key (MAT) ); create table Disciplinas (...
asked by 13.05.2017 / 01:32
0
answers

Insert SQL Server Column receives no value

I'm trying to insert into a simple table, but a field of it, is not saving the value I'm passing to it, and the strangest thing is that all other columns get right. Example INSERT TabelaExemplo (id, nome, outroId) values (1,'Gabriela', 2) I...
asked by 02.05.2017 / 15:22
0
answers

How to RECORD android data in MySQL using webservices (AsyncTask)?

I have an android application that has several buttons on different screens, I should attach the clicked buttons and send to MySQL. li about webservices ( link ) and you need an AsyncTask to make that connection. banco_mysql.java...
asked by 25.04.2017 / 15:23
2
answers

Use the result of an array as the value of an insert - PHP

Good evening, I have a question. I'm uploading a file and extracting its contents and inserting into my database, but I'm having a question about using the array as value > My file consists of a sequence of numbers separated by 15 bloc...
asked by 04.03.2017 / 05:34
1
answer

How to make an INSERT in postgresql with conditional default value?

We have the following simplified table for the example: create table teste( id serial not null ); The following commands cause syntax error: insert into teste( select (case when 1=1 then DEFAULT end) );...
asked by 15.02.2017 / 15:13
0
answers

Query with arrays not working PHP SQL

To edit a report, I need to get everything and turn it into an Array. I can not use UPDATE because the user can add more rows, having to add. In this way, I thought of first to delete the data that codeReport = '$ codeReport' and then give...
asked by 26.12.2016 / 16:15
1
answer

Send selected value to an insert.php file

Good afternoon! I would like to know if there is a way to perform an insert into the database from a selection in a DropDown. This selection would be sent to a file (example) "insert.php", in which you would insert into the table, and this...
asked by 19.11.2016 / 19:52
1
answer

PHP - How to traverse an array of spokes?

I have the following code: <?php while($row = mysql_fetch_array($alunosTurma)){ ?> <tr> <td><?php echo $row['NM_NIS_ALU']; ?></td> <td><?php echo $row['ST_NOME_ALU'];...
asked by 23.09.2016 / 03:07