Most voted "sql-update" questions
Update is an SQL statement that changes the data of one or more records in a table, as well as a subset of results, and can also be filtered by conditions.
Learn more…270 questions
Sort by count of
-
0
votes1
answer25
viewsHow to decrease values in the database of another table, after performing an Insert
$sql = "INSERT INTO `saida` (`nomeProduto`, `quantidadeProduto`, `pa`, `setor`, `dataSaida`) VALUES ( '$nomeProduto', $quantidadeProduto, '$pa', '$setor', '$dataSaida')"; $inserir =…
-
0
votes1
answer235
viewsUpdate with select CTE Error
I am having difficulties to perform an update with select CTE. I want to update the charging field. Below is the query and just below is the update I tried to perform, but the following error…
-
0
votes0
answers494
viewsCall to a Member Function method() on string
I am using Codeigniter and, while trying to do a search in my database to see if a given line really exists, it presents the error Call to a member function checarId() on string. Follow the code of…
-
0
votes0
answers15
viewsTrigger Count Insert and delete
I have a problem in a Rigger that I have here, I want this Rigger after counting and inserting in table x, it deletes the value he searched in table y, can make him count and insert but I’m not able…
-
0
votes0
answers105
viewsUpdating in the database
There is an error in the family composition, which says: Undefined variable: compositionFamiliary the family composition code is: $composicaoFamiliar = DB::table('membro_familiar')->insertGetId([…
-
0
votes0
answers304
viewsHow do I change only one field
When I change a table data, change all other fields: code : <?php if( $_SERVER['REQUEST_METHOD'] == 'POST') { $nome_produto = isset($_POST['nome_produto']) ? $_POST['nome_produto'] : '';…
-
0
votes1
answer51
viewsTake a value from another field other than id
I have the following tables: 1 - Assignments with the following fields: Id, Request, Collaborator and Date Assignment. 2 - States with the following fields: id, State and State. Numpedido is equal…
-
0
votes0
answers63
viewsPHP and Mysql - UPDATE error
On my client’s website, which is programmed in PHP and uses Mysql, users must fill out employee evaluation data. But in two moments, I received notifications from users who will continue the reviews…
-
0
votes0
answers26
viewsUpdate in two tables using php mysql stopped working
Guys I’m having trouble running the update on two tables... It worked until recently, but updated the XAMMP I use for testing and simply stopped! New way to run update? <?php // RECEBENDO OS…
-
0
votes1
answer170
viewsAngularjs/PHP/Javascript - I can’t update the ng-model value
First good night. I have a simple table that is powered by an SQL database. I developed a button that aims to update the contents of the "ng-model" according to what you type in a simple form. The…
-
0
votes1
answer34
viewsError query update set
To $query1 and $query2 work, but the $query1a update is not setting, can anyone tell if it is syntax error? $conexao = mysqli_connect('localhost','rr','4ai','rr') or die('Erro ao conectar ao banco…
-
0
votes0
answers120
viewsTrigger creates duplicate records
Mysql "update" Trigger creates 8 records each update. The first record is the old one, the next seven are copies of the change. As I leave only the old and the edited? I tried to put UNIQUE key on…
-
0
votes2
answers1401
viewsOracle Update with Join - ORA-01779
Good morning, I am trying to update a column using information from another table using ORACLE. However, I am receiving the error "ORA-01779: it is not possible to modify a column that changes a…
-
0
votes1
answer339
viewsTrigger Problem After Update with Mysql Internal Update
I am creating a Trigger in mysql, Trigger is created but when I update the flag to test mysql returns me this error ERROR 1442 (HY000): Can't update table 'aux_Batelada' in stored function/trigger…
-
0
votes1
answer46
viewsUpdate of holidays in SQL Server table
I have an SQL Server table called Dm_tempo. Its fields are: DtRef AnoRef MesRef DiaRef MesExtenso CodDiaSemana SemanaNumero IndFeriado And already have in it days marked as holidays (in this case,…
-
0
votes1
answer138
viewsPass variable in UPDATE PDO PHPERRO: Pdostatement::execute(): SQLSTATE[HY093]
@$c_matricula = $_POST['numero']; @$data_aa = $_POST['data_aa']; @$data_ff = $_POST['data_ff']; if(isset($data_aa)){ @$dataa = date("Y-m-d H:i:s"); $pdo = $dbconn->prepare("UPDATE contato SET…
-
0
votes1
answer61
viewsDoubt with Asp.NET MVC Update
Sorry for the question, I am learning Asp.NET with EF and am having problems performing a specific Update. I want to make a system where there are cash transactions between accounts. The structural…
-
0
votes1
answer324
viewsMysql trigger from one base to another
I am trying to create a Trigger in Mysql where I need in updating a table (I will call tb1) depending on the situation field, delete a record in another database from a table. Base 1 = B1 Table 1 =…
-
0
votes2
answers580
viewsLaravel Update multiple lines of an array
I’m trying to update several lines at once, where I get the information from an array But so far I have not had much success, despite the attempts, not updating, and returning result 0 the code is…
-
0
votes1
answer51
viewsHow do I manipulate a date in an Edittext to add up to 1 day?
I receive in an Edittext a date and I need that when pressing the renewal button this date is increased 1 day. package br.edu.unp.bibliotecavirtual.view; import android.content.Intent; import…
-
0
votes1
answer168
viewsHow to change the /wp-admin directory - without the WPS Hide plugin
You guys, good morning. I need to change the admin area of my wordpress site out of wp-admin, creating another link with the name I want. What I get is that I’m not in the mood for prying looking…
-
0
votes1
answer81
viewsUpdate with two tables at the same time
I’m doing an update to edit window and it’s not giving error, but it’s only working the address part, the beekeeper information part is not updating Beekeeper table <?php session_start();…
-
0
votes1
answer149
viewsHow to insert xml tag within a sql server table
I am trying to insert an XML tag that is allocated within a field in an SQL table (SQL SERVER) I am currently trying so but am unsuccessful: update UserData set tp_ColumnSet.modify('insert…
sql xml sql-update sql-insert sql-server-2012asked 5 years, 7 months ago Guilherme G. Bitencourt 11 -
0
votes1
answer29
viewsUpdate to an A table of distinct numbers using table B of repeated numbers
I have a table (A) of distinct numbers and need to update several fields of this table according to the distinct number, only the other table (B) that will serve to update has the different numbers…
sql-updateasked 5 years, 5 months ago joaosantana77 1 -
0
votes1
answer64
viewsUPDATE does not work with data from a POST
I am getting the data from a POST and trying to update a mysql table, but UPDATE does not work at all. If I use as described below, just replace the values with empty. <?php…
-
0
votes1
answer318
viewsProblem doing password update in DB. - PHP, PDO, MYSQL-
I am calling a function from a class. This function is used to change the user password in db. The class file contains: <?php class Usuario { private $pdo; /*criando variavel para usar nas…
-
0
votes1
answer190
viewsHow to display message after updating a record using PHP?
Well, inside my main page(index.php) I check if there was any request to the server. // Atualizar if (isset($_GET['update'])) { $id = $_GET['update']; $cliente = array( $nome =…
-
0
votes1
answer105
viewsSQL - UPDATE with value from SELECT
Dear, I have two tables (A and B), in which B has a foreign key of A. Example: A(id, campo1, campo2) B(id, idA, campo3, campo4) I need to count the amount of B.idA and thereby define a true or false…
-
0
votes1
answer164
viewsUPDATE ON DJANGO
I’m a beginner in Django and I’m trying to crud, create, read and delete are working, but the update is not working. Please help me out. This is the page with the data listing: <table…
-
0
votes0
answers123
viewsIs ROWCOUNT reliable for change checking?
I am mounting a query to be executed via DAPPER/C#, my idea is not to check if the data exists in the table returning the object to the application, but rather, to check directly in the data bank of…
sql-server performance sql-update software-architectureasked 4 years, 11 months ago Marco Souza 12,304 -
0
votes0
answers35
viewsException when executing UPDATE clause on IBM DB2
Hello, I am doing an UPDATE on an IBM DB2 database, and is returning this message: DB2 query node, error in query: Error: [IBM][CLI Driver][DB2/LINUXX8664] SQL0100W Não foi localizada uma linha para…
-
0
votes0
answers34
viewsProcedure de Update oracle
Good morning! I’m still a layman at BD and I’ve been catching a little bit. I would like, please, to know if you could help me with a given problem. My scenario is as follows. I have two screens, a…
-
0
votes1
answer87
viewsUpdate salary attribute in MYSQL
I’m having difficulty in the UPDATE function, where I need to make a change of - 10% in the DEPARTMENT Table where the Salario attribute is from the FUNCIONARIO and DNOME DEPARTMENT table I’m trying…
-
0
votes1
answer297
viewsError 1064 mysql in UPDATE function
Guys I’m having a problem with the command on UPDATE, I’m using Python 3.8.5 and mysql 5.7.31. value_id = 10 value_column = 'nome' ID = 'rodrigo' comando_sql = "UPDATE user SET %s='%s' WHERE id=%s"…
-
0
votes2
answers50
viewsUPDATE REPLACE works on Phpmyadmin but does not work on Workbench
I can use this code on HphpmyAdmin: UPDATE `wp_posts` SET `post_content` = REPLACE(`post_content`, 'src="https://www.meusite.com.br/wp-content/uploads/2014/07/tipo.gif" alt="Baixar" width="24"…
-
0
votes1
answer249
viewsUpdate user photo data with nodejs and Typeorm
import { Entity, Column, PrimaryGeneratedColumn, ManyToOne, JoinColumn } from 'typeorm'; import Doctor from './Doctor'; import Patient from './Patient'; @Entity('images') export default class Image…
-
0
votes0
answers26
viewsInserting column in mysql database table and after doing the update in the same column created
I’m developing a system: 1- The "USER" of the system registers a service for a particular client who contracted that service. 2- This registration is done via a form.php... 3- Send this data…
-
0
votes2
answers54
viewshow to update id
someone can help me update the ID in this code? public function Editar_Cliente(){ $dados = $this->DadosClientes; $id = $dados['id']; $nome = $dados['nome']; $cpf = $dados['cpf']; $email =…
-
0
votes1
answer70
viewsUpdate using different record from the same table
I need to make a update update the field record of a table, using another record of the same table and same field. My table is as follows: select produto,valor_bruto,acrescimo,valor_liquido from…
-
0
votes0
answers17
viewsService of synchronizing images
I’m working on a project that synchronizes a folder, which contains several images (an absurd amount),. How it works ? The script sends the image data, its name and the relative path to the…
mysql filing-cabinet sql-update asynchronous updatingasked 3 years, 6 months ago William Cardoso 17 -
0
votes0
answers13
viewsHelp with UPDATE considering foreign keys in MYSQL
Hello, good afternoon. I’m trying to make a data change on a table that needs to work as follows: I need to write a Query that UPDATE table 1, with the ID of table 2, but first, make sure to only do…
-
0
votes1
answer20
viewsUpdate with Where in two different database
I want to update the supplier database, in the hydro table, where the cod_barra field of the hydro table already has in the company database, in the products table. That is, I want to turn all bar…
-
0
votes0
answers9
viewsAngular + Nodejs Problem making change in product registration (update)
Good Morning, I’m trying to solve a problem but I’m not getting ...please I need help: When trying to change a product registration, in Angular I get the API status 202 and the record is not saved…
-
-1
votes3
answers210
viewsUndefined variable when updating Database
I have a problem doing Database Update. $AcidenteValidade = $_POST["AcidenteValidade"]; $AcidenteAnexo=''; if (isset($_FILES["AcidenteAnexo"]) && $_FILES["AcidenteAnexo"]["name"] != '') {…
-
-1
votes1
answer557
viewsDelete on an UPDATE Trigger
How can I delete a record that is being entered in a specific condition in a Rigger? example: USE `scompraslenovo`; DELIMITER $$ CREATE TRIGGER `precad_fornecedor_BUPD` BEFORE UPDATE ON…
-
-1
votes1
answer441
viewsUpdate Mysqli Data
Staff need to make the BD update the following data of this wireframe via Mysqli, I would like some tips on how to proceed.…
-
-1
votes1
answer284
viewsUpdate in mysql loop table
Hello, I have a mysql table that contains the student number and class date already registered, and I need to update the "GIFT" field with "S" or "N". In other words, register the traditional call.…
sql-updateasked 7 years, 3 months ago Rui 9 -
-1
votes3
answers737
viewsMake an "Update" with sum of a number that is as character
I need to perform a update summed in a table whose column is of the type text. Example: UPDATE produto SET codigo = 'codigo'+ 1; I have the following return: UPDATE produto SET codigo = 'codigo'+ 1;…
-
-1
votes2
answers46
viewsHow to join edit/new button?
I would like, if there is already $nome registered in the table, it gives an update and if it does not exist, it gives an input. I do not understand what the problem in my code. $dbconn =…
-
-1
votes1
answer125
viewsHello, I have a database - mysql and would like to decrease a value in an entire column
I’d like to use the command update to decrease an hour in the values you already have in the table of several values in the whole column. EX: Nome da Coluna Gostaria da coluna assim HORA HORA 13:45…