Questions tagged as 'sql-insert'

2
answers

Perform action before saving?

I'm getting the requests of the form and putting it all at once to save it using Laravel% co I'm getting this way: public function save(Request $request) { $user = new User( $request->all() ); $user->save(); } The...
asked by 22.11.2018 / 14:03
1
answer

How to do an Insert with conditions in SQL?

I'm trying to make an insert, where a column depends on a result INSERT INTO TABELA (ID, (CASE 'opcao1' WHEN 'opcao1' THEN "campo1" WHEN 'opcao2' THEN "campo2"...
asked by 20.10.2017 / 20:19
2
answers

Insert multiple with PDO php and MySql

My situation, A POST form with a text input and two input radios. Inputs are named respectively nome[0] and tipo[0] . When someone adds more fields to the form, I put .attr to get nome[1] and tipo[1]...
asked by 29.01.2018 / 02:27
2
answers

How to insert 200 new records? [closed]

I need to insert new data into one table, but there are many. I did like this: insert into pessoafisica (coluna1, coluna2, coluna 30) select (dado1 dado2 dado30) But there are many, you can not do 1 by 1. Could anyone help me?     
asked by 13.01.2016 / 15:02
1
answer

How to create records in the MYSQL table according to the value of the variable $ nregistros PHP

I have a $ nregistry variable that defines the value of records to insert into the "forms" table. If $ nregisters is equal to 4 for example, it should enter 4 rows as follows: formularios id|campo 6 | 1 7 | 2 8 | 3 9 | 4 The field "id" i...
asked by 02.10.2018 / 21:04
2
answers

Insert multiple rows in Informix

I use an Informix database and I have to do 3500 inserts. Informix runs line by line and this is impractical. How do I insert all the rows at once? Example: insert into tabela (coluna1, coluna2, coluna3) values (valor1, valor2, valor3) insert...
asked by 05.04.2018 / 17:12
1
answer

Do not Enter Equal Values PHP and MYSQL [closed]

I have a script in PHP and MySQL that looks in the client table for all clients that have not yet been imported to another bank / table and it imports. In the customer table, you have flag imported with values (0 or 1). I make a sel...
asked by 01.11.2016 / 10:46
1
answer

Syntax error in Insert Mysql

I can not solve the error below: Notice: Undefined index: HTML_cor_TAREFA in C: \ Users \ User \ Desktop \ pi Fe \ Order2 \ CadastraTarefa.php on line 14 You have an error in your SQL syntax; '', '', '', '', '', '') 'at line 1 (check the...
asked by 28.11.2017 / 12:40
1
answer

Entering data in mysql, commit () does not work

I wanted to insert into the Database definitely. But with this code I am not succeeding, the registry is saved but does not commit() : import MySQLdb def conn(): try: db = MySQLdb.connect(host="127.0.0.1",user="root",passwd="",db=...
asked by 04.03.2015 / 11:33
1
answer

Query execution after a few seconds

I have a script that logs all page views for my site that I've uploaded, and it's working fine. But now there are some issues with GOOGLE visitation, and there is "a lot", more "much" visitation of Google Robots and it is not legal to have a Web...
asked by 21.05.2018 / 23:08