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
votes0
answers76
viewsRoutine to validate if date is earlier than today, if changing the field status to full
I need to do a routine to check if the end date of a particular event has passed, that is if the date of the "end" field is lower than today’s date update to the "state" field to "finished". I’m…
-
0
votes2
answers343
viewsHow is crud to update the records in SQL Server by Visual Studio C#?
I am using this code, it does not error but does not update the data public static int attLoja(LojaVirtual loja) { int resposta = 0; using (OdbcConnection conexao = ConexaoPadrao.CreateConnection())…
c# sql-server visual-studio sql-update crudasked 9 years, 5 months ago Nataniel Soares Rodrigues 155 -
0
votes0
answers30
viewsSymfony2 - Problems with Doctrine2 Preupdate
My entity Budget has some methods that are executed in PrePersist and PreUpdate. It’s them: /** * @return \DateTime */ public function generateNextPaymentDate() { if ($this->getStartsAt() !==…
-
0
votes1
answer46
viewsEdit form does not display loaded data
I have been trying for some time to make a form in Codeigniter 3 for editing data to display in your fields the values of each column of the selected record. The operation update is working…
-
0
votes1
answer568
viewsAdd dot('.') after the 3rd character
I have a registration with the original code of the product, but I need to put a . (dot) after the 3rd character. Original code: 2022027 As it should be: 202.2027 Follows the structure of the table:…
-
0
votes1
answer487
viewsSend a value to modal
I have a table with several employees and on it counts the plate of each hum. I created a modal that when the manager clicks on the employee name is called a modal where it is possible to enter the…
-
0
votes1
answer59
viewsError in UPDATE function
I am having this error while trying to run this update: Fatal error: Uncaught Exception 'Pdoexception' with message 'SQLSTATE[42000]: Syntax error or access Violation: 1064 You have an error in your…
-
0
votes1
answer649
viewsupdate multiple records with php mysql
I have a form that lists several records and I want to update the status field of these records but at once but I am not able to. my for and code: <form id="form1" name="form1" method="post"…
-
0
votes1
answer126
viewsError in Change - Java and Mysql method
Java masters, I’m working on a college project, using MVC layers, and I’m having trouble with the alterarClient method. When I click the Change button on the form, it sends a message saying that the…
-
0
votes0
answers26
viewssql stored Update Value With value from the previous record in the same table
I have a table with several repeated names sequenced by another column called id2 where each 1 of these records has a column with a quantity Example : Name-Quantity-Value2-id2 teste1-1000-0-1…
sql-server function select-sql sql-update stored-proceduresasked 7 years, 10 months ago Bruno Almeida 39 -
0
votes1
answer318
viewsHow to update a table by going through another table in Mysql?
I have a scheme according to the picture below: The goal is to update the values of the seller_comission column in the table tbl_history. The table tbl_history already has a few thousand records.…
-
0
votes4
answers1103
viewsUpdate with Laravel does not take model id
I am trying to perform a simple function to change the password of the logged in user using the code: $user = User::find(\Auth::user()->idusuario); $user->password =…
-
0
votes1
answer190
viewsCRUD U cannot get the ID and edit the Update
Folks I need a light to unwind a TIMESHEET. I have the following code. <form method="post" action="includes/input.php"> <button type="submit" class="btn btn-primary"…
-
0
votes3
answers171
viewsDoubt - Update SQL Server 2012
When the update below is run for the first time, the field comes out correctly in the way I want it to be below, but if I run it again, it comes out that way. What I want is that regardless of how…
-
0
votes0
answers35
viewsProblem giving update in a php table with no return
I have no return on the page when I click on the input with name['edit'] even with Try catch, the page does not print anything, so I do not know what to do right, I wanted to know what I’m doing…
-
0
votes1
answer692
viewsUpdate Object List via Entity Framework
Good morning! I wanted to ask for your help just to see if there’s a better way to do it. Today I have a list of objects like Formatacao_RelatorioLinhaDeletada and perform a foreach on this list,…
-
0
votes1
answer56
viewsUpdate in a table row
I’m starting to use the Sqlite on a project and would like a help on how to do the update in a specific line, in this case, only one "ID" will be updated at a time. Follows the codes: View and where…
-
0
votes1
answer88
viewsUpdate table without losing information
I’m making a profile screen with photo. The upload and display of it is ok. But when I change some other page data and saved, the image is deleted from the bank (or at least some of the bank). How…
-
0
votes1
answer73
viewsUpdate via another table - Mysql
I have the following problem: I have a table rev_tasks which contains id as key, and a second table rev_reviews and has as a foreign key task_id, pointing to the task, in addition I have a field…
-
0
votes1
answer59
viewsupdate in the Standard
good afternoon to all!!! I put together the form, which will be sent to the "update" method public function update(Request $r, Voluntarios $vol) { $up = $vol->update($r->all()); var_dump($up);…
-
0
votes1
answer3485
viewsUpdate Multiple Columns
I have the following situation, I need to update the table SB1300 in the fields B1_DESC and B1_CODBAR for several lines. The Where will be the B1_XCODORI I can do it in the same query?…
-
0
votes1
answer166
viewsSQL UPDATE SUM VALUE NOT NULL
dataTmp referencia nStock 2017-02-18 DC01234567 NULL 2017-02-18 DC01234567 NULL 2017-02-18 DC01234567 NULL 2017-02-19 DC01234567 0 2017-02-19 DC01234567 0 2017-02-19 DC01234567 0 2017-02-20…
-
0
votes1
answer206
viewsUpdate with Resource Angularjs
There is the method Callback to the resource.update in the AngularJS? Type, var instancia = Resource.get({id:1}, function(data){ instancia.$update({id:idModelo}, modeloAtualizado) }); This works,…
-
0
votes1
answer247
viewsHide two div from php form
This is the code I had: <?php $servername = "xxx.xxx.x.xx"; $username = "xxxxxx"; $password = "xxxxxxxx"; $dbname = "xxxxxxxxx"; $conn = new mysqli($servername, $username, $password, $dbname);…
-
0
votes1
answer41
viewsSynchronize Mysql database with XLS
The situation is as follows. I have a MYSQL database and XLS file on an FTP server The code below downloads the XLS to read and update dos in the database from the XLS data. The problem is that it…
-
0
votes1
answer878
viewsDelete SQL record with dependency
Good afternoon. I wonder how to delete records from a table containing foreign key. I would not like to delete the children records (to keep the history). I always get a message warning that there…
-
0
votes1
answer82
viewsProblem while doing update
I have on the site the system to register, list and edit users. Registering and listing are ok, however, when trying to update a record, it is not changed on DB and also does not return any error. I…
-
0
votes1
answer28
viewsCurrent version of Prestashop recommended for migration
I will switch to a more current version of Prestashop. I need to use the modules for Secure Pag, Paid Market, Paypal and FK modules (or equivalent). What is the latest version where these modules…
-
0
votes1
answer841
viewsUpdating a field in Mongodb
Considering the following structure: { "_id" : ObjectId("5ad69abb3630404194c80571"), "cnpj" : 2352345234523452, "razao_social" : "Lalala Ltda.", "fantasia" : " "aiufhdiua Ltda.", "dt_criacao" :…
-
0
votes1
answer995
viewsDelete or change sql data using php
I am creating a page where some information will be uploaded, and this information will be transferred to a database and displayed on the same page, as below: As highlighted in blue, I created a…
-
0
votes2
answers516
viewsUpdate or Insert with data from another table
I have this command SQL to update the tableREQUISICOES with the table dataREQUISICOES_ATUALIZA. Use as key to update the field numero_requisicao, but I need if not find correspondencia on the table…
-
0
votes1
answer22
viewsColumn update of a table with data from another table
how can I perform this update? update estoque,tabcest set estoque.cest=tabcest.cest where locate(trim(tabcest.ncm),estoque.ncm) and estoque.tipoproduto in ('produto','consumo') and estoque.cest is…
sql-updateasked 6 years, 3 months ago Alcioles 1 -
0
votes2
answers481
viewsDoubt - SQL update from PHP form
I have a table where columns 1 to 5 are fixed data that I feed SQL and it appears the listing on the WEB page. On this WEB page I have a form in which the user must answer 3 questions, in inputs in…
-
0
votes2
answers132
viewsProblems with update in federated table
I have a problem understanding a mistake when using a federated table. Setting: Server A: create view federated_view as SELECT .... Server B: create table table_federated (A, B, C) ENGINE=FEDERATED…
-
0
votes2
answers82
viewsSQL Updating Wrong Value
I am creating a QUERY to change every day of the dates registered in the BD to the last day of the month of that record... what happens is that when I play the QUERY selecting a record in the month…
-
0
votes0
answers28
viewsConnect my pc database to hosting
I want to connect the hosting in the local database of my PC I am using linux. I have ports 1604 and 8080 open. When I access my ip:port on an external network, I can access my website. But when I…
-
0
votes1
answer230
viewsChanging data with PDO but does not update in the database
My form is like this: // pega o ID da URL $id = isset($_GET['id']) ? (int) $_GET['id'] : null; //Valida a variavel da URL if (empty($id)){ echo "ID para alteração não definido"; exit; } $sql_selecao…
-
0
votes2
answers53
viewsUpdate data associated with a specific name in a PHP and SQL database
UPDATE: This question will be long - notice that I am very inexperienced in PHP. I have been (trying) to create a web page that can access a database created in Phpmyadmin in the last few days, this…
-
0
votes0
answers34
viewsUsing the Update command but does not update the column in the table
I used the following command : update cliente set telefone = '969843225' where nome = 'João da silva'; Afterward: select * from cliente; Did not update the record. Image of the records:…
-
0
votes0
answers131
viewsUpdate record with image - Laravel
Good afternoon! I have a problem with the controller update method. By invoking the update, instead of updating the record, the log is creating a new one. This way I get two similar records.…
-
0
votes0
answers106
viewsWhat’s the UPDATE error? (Java with Database)
Hello, I am developing for the first time a system in Java with Database and there is some error in the Update that since yesterday I look for and not found. The error is that when I click to…
-
0
votes1
answer59
viewsUpdate Sqlite with Edittext Android
Good morning gentlemen, I’m trying to update my Sqlite database through my Edittext but it shows error, someone could tell me what I’m missing ? public void insererazaosocial (SQLiteDatabase db){…
-
0
votes1
answer102
viewsHow to do an onclick with update in the database?
I’m wondering how to make an onclick by clicking already do an update in the database
-
0
votes1
answer48
viewsUpdate: ASP + Access
I am trying to update an ACCESS table on my website, only it displays this error: Microsoft Access Database Engine error '80040e14' Syntax error (missing operator) in query expression '[nome] ='.…
-
0
votes2
answers61
viewsHow to compare in update
The main code is this: $dbconn = mysqli_connect($servername, $username, $password, $dbname)or die("Failed to connect to database:" . mysqli_error($dbconn)); $query = "SELECT id_medico as txtid, nome…
-
0
votes1
answer364
viewsAdd value to a variable in the mysql table
I have a Rigger, whenever a value is added to the table in mysql I take the old value(OLD) and add to another table, but I would like to improve this by adding the values to the same table but…
-
0
votes1
answer1049
viewsHow to make a "scan" using SQL?
I have the following structure in my database: Table tgffin with the columns: CODNAT, AD_CODNAT_OLD Table tgfnat with the columns: CODNAT, AD_NAT_OLD I want to reclaim the value of tgfnat.CODNAT…
-
0
votes1
answer567
viewsAjax and PHP Update
I’m having a problem editing the database values. My Script Code: $(function(){ $(document).on('click', '#salvar_pedido', function(e) { e.preventDefault; var id =…
-
0
votes0
answers83
viewsChange input file field
I’m having a problem with my file changing files pdf. I just wanted it to change when the field input file is completed. is not showing any error, only when I edit the form, and do not fill anything…
-
0
votes2
answers538
viewsUpdate in year without changing the month, day and time
I am trying to make a script to change the year of a table record where the dta_shutdown field has the date in the format of 08/25/2091 13:06:00 in Oracle database. I need to change the year 2091.…