FAQ Database Discussion Community

Deleting a row which is based on a varchar primary key in php

I'm trying to delete a particular row in a table in php and I'm trying to use the primary key which happens to be of the type varchar, the primary key is course_Code course_Code||course_Title||credit_Load||lecturer_id csc 450 || S.E || 3 || 0 lecturer_id will always be 0 for all records...

PDO delete specified row from table

I have a little problem ... I am using PDO and part of my code is to delete a specific row from the table in my database. My code is the below ... function deleteFromWorkWhere($db,$table,$user,$rowId){ switch($table){ case 'work': $tbl = 'work'; break; } if($rowId=='all'){ // delete all records $sql =...

php delete file and record when form submits

I have a form which deletes a record from mySQL database. This database contains the image/file name. How do I add into the statement to also delete the file in the website directory with the same image/file name. if ((isset($_POST['file_name'])) && ($_POST['file_name'] != "")) { $deleteSQL = sprintf("DELETE FROM image_carousel...

UITableViewCell overlaps the delete button in the UITableView

As shown in the image below when I enable the edit mode for the tableview and click the (-) button the delete button is hidden behind the UITAbleViewCell. Not sure what causing the issue as I have used same similar type of custom UITAbleVeiwCells and delete worked without any problem....

Delete row in TableView and remove the core data - iOS / Swift

I am having an issue with my swift app. I am trying to implement the swipe feature that will prompt the user with the "DELETE" option. As of right now my code only allows me to swipe but the delete button is not being generated. I am currently using Xcode...

SQL Delete with relation to another table

I have two tables, for example: TableA with columns GUID,ProgKey,UserKey,ProgName. TableB with columns GUID,AppKey,ModeName. Foreign Key: GUID->TableA.GUID I need to delete TableB.AppKey with specific value but only with the condition where TableA.UserKey= specific value. I tried something simple like this but it didn't work: Delete from TableB b, TableA a...

SQL Delete after a different date for each ID

I am performing a conversion analysis that only needs to look at activity up to the first conversion for each User_ID. I can find the time of the first conversion for each user with this query: select min([Time]), [User_ID] from [Table_1] where [Event_Type] = 2 --just a filter for conversions...

In Java, How to delete a row in a text file that meets search criteria?

public static String findAndDeleteStudent(String qStudent) { String fileName = "data/Students.txt"; String findNumber = qStudent; File file = new File(fileName); Scanner dataText = null; String result=""; try { dataText = new Scanner(file); while (dataText.hasNext()) { String line = dataText.nextLine(); if (line.contains(findNumber)) { //System.out.println(line); //line.trim(); //System.out.println(items[1]); System.out.println(line); result ="done"; } } }...

Trying to delete the selected item in the XPages repeat control, but does not work

I am trying to delete the selected item in the Xpages repeat control, but it does not work. Please help? Here is my code in the repeat control section <xp:repeat id="repeat1" rows="30" var="eachQuestion" value="#{questions}" indexVar="rowIndex"> <tr> <td>...</td> <td> <xp:link styleClass="btn btn-danger" id="deleteLink"> <xp:eventHandler event="onClick" action="#{javascript:eachQuestion.getDocument().remove(true);}" submit="true" refreshMode="partial" refreshId="listContainer" /> <i...

Removing empty rows in excel using C#

I want to remove empty rows at the end of program exection. In details I am inserting some results after calculation using C# in predefined excel sheets. At the end I need to delete/remove the empty rows programatically. Could any one suggest solution. My code is little big so I...

How to delete row in database through ajax

I want to delete a row in my database according to the ID that the row is. Each row has a delete button and that button is placed by using a form in the php file for each row. I used an javascript function with ajax to display the table...

How to delete on the trash icon glyphicon with php

I am generating a table with data. the table contains action. and one of those actions is to delete a row from that table (and from the database). But how can i manage to delete a row when i click on the Trash Glyphicon without moving to another page. <form...

how to use _infile_ in SAS to delete lines in a hierarchical prog

Trying a hierarchical prg in SAS Studio I'm trying to retain the Buyer code and Vendor with a retain statement as "headers" and read in the detail with a if/then conditional statements, but cannot figure out a way to do this with the repeating labels in the way. How can...

PHP delete button… doesn't work(modal)

Can someone tell me what I'm doing wrong here? I create a table which has a delete button in each row, when clicked pops up an modal and asks if I want to delete the row. But when i click on the button nothing happens. Why is this happen?(I suspect...

Deleting rows in R conditionally

I have a data where the first column is a bunch of ID numbers (some repeat), and the second column is just a bunch of numbers. I need a way to keep each ID number only once based on the smallest number in the second column. Row# ID Number 1...

Scala SQLite Invalid Query for DELETE

I have problem when trying to add a row and then delete one row from a table. What I have now is: def addItem(item:Item)={ val query = items.filter(_.name === name) items += (item.name,item.timestamp) if(query.list.length > 10) { query.sortBy(timestamp).take(1).delete } } It is supposed to store 10 latest items in the...

delete trigger to delete row in another table in another database sql

I have a database schema called Fulcrum that has a table called Orders with PK on OrderNO, OrderDate, TenantID I have a bridge database schema called XFer where I also have a table called Orders with the same field names but no keys on OrderNO, OrderDate, TenantID I need to...

Wrong row gets deleted in DataGridView bound to DataAdapter

Situation: I'm writing a Winforms app using C# in VS2013 with .NET4.0. I have a datagridview which I bind to a DataAdapter linked to a MySQL table. I'm performing updates using the DataAdapter's Update method. Due to the unconventional handling of dates and booleans in the MySQL table I set...

Code not deleting the Respective rows from MYSQL table using PHP

The following code displays a table having 4 columns --> id : INT; anytext : TEXT; varcar : VARCHAR, insertdate :TIMESTAMP <?php $sql_r="SELECT * FROM abcd "; if($records_r=mysql_query($sql_r)) { echo ' '; $k_r=1; while([email protected]_fetch_assoc($records_r)) { $id_r=$ven_r['id']; $anytext_r=$ven_r['anytext']; $varcar_r=$ven_r['varcar']; $insertdate_r=$ven_r['insertdate']; echo"<tr>"; echo "<td> <form method='POST' action='example.php'> <input type='hidden' name='id_delete2' value='".$id_r."'>...

controllerWillChangeContent not being called when deleting all entries of an entity

Below is the method I have implemented for a tableView "reset" button. I've verified that the entries in the Entity are being deleted, however my controllerWillChangeContent is not being called after the deletion. Is there a way to call this method manually? CoreDataStack *coreDataStack = [[CoreDataStack alloc]init]; NSFetchRequest *fetchRequest =...

How to check for a particular value in a column and delete the entire row corresponding to its value?

I have a set of 100 part numbers in a particular sheet and want to eliminate the data corresponding to those 100 part numbers from my Master Part List sheet (which contains a huge list of parts). I don't know how to proceed for this?

MySQL Delete-Select row

I'm trying to delete a row from table subscription where there is two foreign Keys (id_user and id_journal). The information that I have is email from table user and nome from table journal. The deleted row needs to match user.email and journal.nome. I can't find a solution. How can I...

Delete query won't work [Solved]

I'm trying to remove a row from the database that has the same ART as is selected in the combobox. I had it working before but when I changed the database it was supposed to delete it from it stopped working and gave me a error message. I did change...

How to remove row in 2d array in javascript

How to remove row in two dimensional array in JavaScript with row number. If I want to delete all elements in row number 4 then how can do it??

How to delete multiple records in range with db_delete() in PHPLucidFrame?

I'm deleting multiple records within a period using db_delete() in PHPLucidFrame. Is there any way to achieve this?

MySQL: delete table rows if string in cell is matched?

I have a table with a column meta_key … I want to delete all rows in my table where meta_key matches some string. For instance I want to delete all 3 rows with "tel" in it - nut just the cell but the entire row. How can I do that with...