Most voted "delete" questions
Generic tag referring to the action of removing the element from its current location (removing database data, removing list elements, etc).
Learn more…75 questions
Sort by count of
-
31
votes4
answers6983
viewsDelete thousands of records from a table
I have a table, for example, pessoa, and would like to delete all people over 40, with the script below do it: DELETE FROM pessoa WHERE pessoa.idade > 40; The problem there is more than 2 million…
-
11
votes2
answers2353
viewsWhen should I inactivate or delete a record? Good database practices
I have the following doubt: When should I inactivate a record? When should I delete a record? In case you would like a good practice tip, in which tables it pays to create a STATUS column? Being the…
-
7
votes4
answers4763
viewsDelete multiple rows from a database
I’d like to delete several figures. For example this would be to delete a line delete from paginasimagens where idPaginasImagens=121; my values are sequentially so a method that is between elements…
-
6
votes1
answer1320
viewsReceive parameter in delete request
I am trying to pass a parameter to my DELETE request, I tried to do the following: Use in the same way I use in GET (where it works normal). app.delete('/contatos', function(req, res){ var obj =…
-
5
votes2
answers744
viewsDeletion of related data - Entity Framework and C#
Hello, Using the same structure that I have been presenting here for some time, I come to ask for help now to delete the related data. Follows the entities.. public class Artista { public int…
-
5
votes1
answer51
viewsHow to reload the page after the message closes using Hubspot Messenger(). run()?
I’m making an MVC app and I need to re-load after the message closes (success or not). How can I do this? Codepen for testing: http://codepen.io/larissa/pen/rjOpRM/ HTML: <button class="btn…
-
5
votes2
answers61
viewsWhat is the definition of delete in Javascript?
I came across an instruction that delete represents a type in Javascript. At least that’s what I understood. I’d like your help because I couldn’t find any references on the Internet. if…
javascript characteristic-language objects operators deleteasked 4 years, 6 months ago Willian Andrade 53 -
4
votes2
answers2318
viewsExclude character in a given position?
How do I delete a certain character in a certain shell position? I’ve tried with sed, but I can’t get into position either, just the pattern. ",45123","B23142DHAS675" What I wanted was to erase the…
-
4
votes1
answer14054
viewsmysql Delete all records from a table except the first
Does anyone know where I’m going wrong? or if it’s possible to do this? I wrote the query like this: DELETE FROM reservas WHERE ID NOT IN (SELECT ID,IDORIGEM FROM reservas WHERE ID='387' and…
-
4
votes1
answer964
viewsHow to delete objects within a list?
I have the following code: using (Context contexto = new Context()) { List<Cliente> listCliente = contexto.Cliente.Where(x => x.Status == 0).ToList(); } How do I delete this result from the…
-
4
votes1
answer47
viewsWhy does the "delete" operator not remove references to a deleted Javascript property?
I am reading a book about data structure in Javascript and came across the following situation: why delete does not delete a reference value? I will give an example to be clear. const items = { a:…
javascript characteristic-language objects operators deleteasked 3 years, 6 months ago Mr Genesis 464 -
3
votes5
answers1137
viewsPostgresql - Remove tuple referenced by another table
I’m having a problem that I didn’t find anything in Google (maybe I didn’t know to ask him) Just imagine the following: I have 11 tables, one call tbl_pai and 10 other calls tbl_filha1, tbl_filha2,…
-
3
votes2
answers260
viewsAngular - delete $Scope.categoria_nova;
My delete does not work when registering a new category: The aphorist doesn’t clear the fields, which can be? JS: app.controller('categoriasCtrl', function ($scope, $http) { $scope.categorias = […
-
3
votes2
answers425
viewsUse delete on allocated objects without new?
Hello, from always until today in my c++ projects with Qt, I have always used delete objects only when I dynamically allocate them with the operator new, But in my last project that was relatively…
-
3
votes1
answer1791
viewsHow to remove duplicate records in Mysql with WHERE condition
My address book table has many duplicated addresses for each client. Note in the image below that I have many duplicate Zip Codes for the same client with ID 12. I need to remove duplicate addresses…
-
2
votes1
answer167
viewsPHP unlink is deleting everything
I have this code: And I wanted to delete a file based on the address for directory and file you are given, the problem is that it is deleting everything despite the argument (address) that I step…
-
2
votes3
answers7687
viewsDelete duplicate record from table in Postgresql
Situation Currently I performed a process twice in which it should be processed only once. So my table was populated twice with the same data. tb_kardex cd_kardex | cd_item tb_kardex | 1 | 45875 | |…
-
2
votes1
answer131
viewsSee changes (delete) on grid Vb.net
Hi, I’d like you to help me with the next one. i have a form that does a search for a code with several grids and a button, this button makes a number of changes in the various grids but also want…
-
2
votes1
answer163
viewsHow to remove a specific character from some specific strings within a Python list?
I have a list of examples: ['#[Header]', '#Application Name\tLCsolution', '#Version\t1.24'] I would like to know how to remove a specific character, such as the # of all elements of the list, or, if…
-
2
votes1
answer597
viewsButton Delete a line in DB
I’m having trouble with a little code with delete button. I’ve tried a few ways but I couldn’t get the button to $deletar do the delete function. Follows code show each registered slide and wanted…
-
2
votes1
answer453
viewsDelete Rows in several tables dynamically in Postgres
I need to delete to clean the database automatically in tables that are within different schemas, "public" and "cine"; I have the following query that returns me SELECT concat('"',table_schema,'"',…
-
2
votes1
answer75
viewsDoes it matter to delete and create new lines or update old ones?
Not taking into account the technical difficulty of doing one thing or another, but rather the consistency of the bank, the speed of subsequent operations and the professionalism. If I have a…
-
1
votes3
answers9511
viewsAsk before deleting database data
I have this code: <?php if ($result = $mysqli->query("SELECT * FROM usuario ORDER BY id")) { if ($result->num_rows > 0) { echo "<table border='1' cellpadding='5' cellspacing=0…
-
1
votes0
answers44
viewsLaravel request class rules validate delete
In the Laravel 5.3 there is some way to use the rules of the classes request not to let a bank record that has relationship be deleted? Similar to the rule that doesn’t let a record be entered…
-
1
votes1
answer85
viewsUnlink: Permission Denied - Trying to get Property of non-object
Good afternoon, everyone, Recently I’ve been trying to manage images where I need to use unlink. Follow the full function code: $query_listaPic = "SELECT * FROM tbl_imagem WHERE tbl_produto_id =…
-
1
votes0
answers63
viewsDELETE android with Webservice URL does not work
I’m with an annoying problem that I haven’t been able to solve yet and involves PHP and Android (more PHP actually). I’m accessing a PHP Webservice that makes an operation according to each method…
-
1
votes0
answers92
viewsDeleting images with PHP
I’m working on a personal cloud for my girlfriend because her iCloud is full. Basically this is what’s making it all work: <?php $dirname = "uploads/"; $images =…
-
1
votes1
answer72
viewsMove File to JAVA Recycle Bin
Hello, there is some way I can move a File to the recycle bin instead of deleting it permanently? File f = new File("um caminho com um arquivo top aki); f.delete(); //retorna um true caso consiga…
-
1
votes0
answers318
viewsSlim return on the same page of a POST submission
I’m sending a request post to a URL, but I need to return to the same page a message or alert saying if the ID is already registered or not. I already have the query and method to do this, but I am…
-
1
votes2
answers347
viewsError in DELETE method, to delete a data from a table
I am trying to make a method to delete an entry from a table with Java and jsp, but is giving error 405. I will attach the codes. Productodao.java.: public void remove(Produto produto) {…
-
1
votes0
answers220
viewsWhen making a DELETE request, the org.springframework.web.Httprequestmethodnotsupportedexception error is returned
When making a request to delete a user the following error is returned: { "timestamp": 1500142937327, "status": 405, "error": "Method Not Allowed", "exception":…
-
1
votes1
answer159
viewsc# delete Drawstring in picturebox
I have a pictureBox where the user with each mouse click inserts a text on top of an image in a pictureBox. It inserts several texts at various points in the image, the inserted text is taken from…
-
1
votes1
answer69
viewsDeleting a Specific Image from a File
I am currently working on a new project, using Codeigniter, it is my first experience and I do not find great help, I want the user to be able to delete a photo chosen by him from his folder, The…
-
1
votes1
answer14
viewsListing duplicate data when performing SQL and performing . load()
I looked in several places, including in the jQuery documentation and did not find a solution. I need a light of what to do on this occasion. I apologize if it is not very clear, I have never been…
-
0
votes1
answer564
viewsI cannot run DELETE in SQL when submitting form via POST in PHP
I have this code and would like to delete a list of users when the form was submitted, but it is not working: Any hints? if (!empty($_POST['username']) && !empty($_POST['email'])) { $query =…
-
0
votes1
answer136
viewsDelete an element from my Listview
I need to delete an element of my Listview and I’m in trouble my code is this Host = new String[] { "Host1 ", "Host2", "Host3"}; Descricao = new String[] { "Estado do Host", "Estado do Host", "Host"…
-
0
votes1
answer881
viewsDelete file in Delphi use
Does anyone know if it is possible to delete a file on Delphi, using the function DeleteFile, when the file is open? Thanks in advance.
-
0
votes1
answer36
viewsDelete some array results
I need to leave in the array below only the values Yes: 1 and 2 Any suggestions? I tried unset() but it didn’t work. array (size=3) 0 => array (size=4) 0 => string 'Adair' (length=26) 1 =>…
-
0
votes0
answers40
viewshow to force the download of a php file and delete it right away
I made a file with fopen(); and I need it to be downloaded on the user’s computer and deleted right away, and it is necessary that the file name is in a variable, because the file name will vary…
-
0
votes0
answers48
viewsWhat’s wrong with that code?
all right? I am a beginner in PHP and I am "side" in a simple code, in which I have seen numerous answers here in the forum, and I did exactly as it is in the answers (until CTRL+C CTRL+V) and it…
-
0
votes1
answer75
viewsWhat would the @DELETE methods of a Restfull java api look like?
I’m using the FullEntityRepository of deltaspike, the Response has to be a status 204 if successful, and status 400 if not. Any tips? Service layer: @Transactional public void deletar(Integer id){…
-
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
answer264
viewsDelete older duplicate data on MS SQL server
I’m having a problem with a table that has duplicate data. Duplicate data is identified through an ID, where each row has the identifier and a date, how can I erase all data with more than 1 record…
-
0
votes1
answer246
viewsHow to delete all JPG files inside a folder using PHP
I have a script that imports photos and creates mini and medias thumbnails inside the registration folder and I would like that after you run this one, it erases the original photos. The structure…
-
0
votes0
answers37
viewsQuery with Arrays not working PHP SQL
To edit a report, I need to take everything and turn it into an Array. I cannot use UPDATE, because the user can add more lines, having q add. Thus, I thought of first deleting the data that…
-
0
votes0
answers27
viewsDelete line according to date difference in Mysql
I am trying to delete lines from a table using as a reference the difference between the current date and the date the line was registered. Here is my code: DELETE FROM lixeira WHERE diferenca >…
-
0
votes0
answers29
viewsHow to Recover Deleted Lines from MYSQL?
I unintentionally deleted some rows from mysql, because of a LIKE misspelled. There’s a way I can get those lines back? I don’t know if it helps the answer, but the delete command was: DELETE FROM…
-
0
votes0
answers32
viewsCreate trigger to delete old Mysql data
Good morning. have a table "data" in this table are saved various information like 'user_id' and 'time'; I would like to create a trigger for when entering a new data delete the older than 90 days.…
-
0
votes1
answer397
viewsdelete files from table
I’m trying to delete an item from the table, but when I click it doesn’t delete. Recognizes the id and everything, only when I update the item has not been deleted. <?php…
-
0
votes0
answers78
viewsCreate a. bat file to delete information from a given table in postgresql
I am trying to perform a delete in postgre via bat file, I need it to be so due to a particularity of the system I am adjusting. However, I run the file and it doesn’t delete, I tried including a…