Questions tagged as 'sql-update'

1
answer

Execute an UPDATE in MySQL only when the number of rows equals 1

How to make a UPDATE only run when the number of rows that returned is equal to 1 in a single query only with SQL syntax using the example below? Example: SELECT count(*) AS rows FROM exemplo WHERE id_usuario = 100; if (rows == 1) {...
asked by 03.02.2016 / 17:17
0
answers

Limits to update with BufferedReader in mysql

Hello everyone, good morning, I'm having problems with an update routine in the mysql database, I'm reading a BufferedReader containing more than 3,000,000 records and doing the update in mysql, but when I'm near the first 1,200 records the syst...
asked by 11.09.2015 / 14:01
0
answers

error in mysql update

I'm getting this error when I try to update with mysql in asp. Microsoft VBScript compilation error '800a03ee' Expected ')' /postos/reg.asp, line 525 set ins_regenf1 = conn.Execute("UPDATE reg SET hemo ='"&hemo &"' WHERE id_reg='"&a...
asked by 25.08.2015 / 12:26
1
answer

upload update

I have a problem with the way to save the upload file. I have a php file that does the update that is in the folder it processes, and an upload folder to save the files that have been saved. $id = $_POST['id']; $titulo = $_POST['titulo']; $de...
asked by 09.08.2017 / 16:24
2
answers

Change Mysql data in PHP

I have Tb_workers where it is filled out by a form. And then I created another page to change that data. Change.php      $id = $exibe["id"]; $Nome = $exibe["Nome"]; $Morada = $exibe["Morada"]; $Tipo = $exibe["Tipo"]; $Email = $exibe["Em...
asked by 18.02.2014 / 10:09
1
answer

Problem with android UPDATE

I'm having an issue giving update to a table in Android/SqLite : I tried two ways I found: String query = "UPDATE MY_TABLE SET VALUE1='VALUE1'... WHERE KEY_ID = KEY_ID" SQLiteDatabase db = dbHelper.getWritableDatabase(); db.exe...
asked by 14.09.2016 / 21:48
2
answers

SQL Updating Wrong Value

I'm creating a QUERY to change every day of the dates recorded in the DB for the last day of the month of that record ... what happens is that when I play QUERY by selecting a record in month 5 (May) it updates the value of the day with 30 ......
asked by 03.08.2018 / 16:22
1
answer

(MySql) Insert or Update in the database

I need to perform a Insert in the database if there is no person's cpf. if it exists it has to do a Update . But all this through a single script in MySql . I have illustrated the example below as I am doing today: 1 If the cpf of the...
asked by 16.05.2018 / 03:39
1
answer

Delete SQL record with dependency

Good afternoon. I would like to know how to exclude records from a table containing a foreign key. I would not like to delete child records (to keep history). I always get a message warning that there are dependencies when trying to upd...
asked by 31.01.2018 / 17:28
2
answers

Force update of an element in HTML / Javascript / ASP.NET

Greetings, friends of Stack Overflow. I have a question that involves updating the data entered by the user. On the site I'm working on, the user has access to a text editor to change the labels on certain photos. When editing the text and su...
asked by 18.12.2017 / 17:47