Search Results

Search found 17867 results on 715 pages for 'delete row'.

Page 57/715 | < Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >

  • CakePHP hasAndBelongsToMany (HABTM) Delete Joining Record

    - by Jason McCreary
    I have a HABTM relationship between Users and Locations. Both Models have the appropriate $hasAndBelongsToMany variable set. When I managing User Locations, I want to delete the association between the User and Location, but not the Location. Clearly this Location could belong to other users. I would expect the following code to delete just the join table record provided the HABTM associations, but it deleted both records. $this->Weather->deleteAll(array('Weather.id' => $this->data['weather_ids'], false); However, I am new to CakePHP, so I am sure I am missing something. I have tried setting cascade to false and changing the Model order with User, User-Weather, Weather-User. No luck. Thanks in advance for any help.

    Read the article

  • jQuery add/remove row

    - by bocca
    I am trying to setup jQuery rows, with add/remove row functionality. I got started with online tutorial, http://jsbin.com/aciba that works fine. It only has input forms though. We need select to choose from. Now, I made some changes to accept selects as as well as inputs: http://jsbin.com/emata This does not work. Try selecting option 3 in cell 1, and press add "Add". The row added gets default "Cell 1" selected option to 1. What could be the reason?

    Read the article

  • When to delete newly deprecated code?

    - by John
    I spent a month writing an elaborate payment system that handles both credit card payments and electronic fund transfers. My work was used on production server for about a month. I was told recently by the client that he no longer wants to use the electronic fund transfer feature. Because the way I had to interface and communicate with the credit card gateway is drastically different from the electronic fund transfer api (eg. the cc company gives transaction responses immediately after an http request, while the eft company gives transaction responses 5 business days after an http request), I spent a lot of time writing my own API to abstract common function calls like function payment(amount, pay_method,pay_freq) function updateRecurringSchedule(user_id,new_schedule) etc.. Now that the client wants to abandon the EFT feature, all my work for this abstracted payments API is obsolete. I'm deliberating over whether I should scrap my work. Here's my pro vs. con for scrapping it now: PRO 1: Eliminate code bloat PRO 2: New developers do not need to learn MY API. They only need to read the CC company's API PRO 3: Because the EFT company did not handle recurring payment schedules, refunds, and validation, I wrote my own application to do it. Although the CC company's API permitted this functionality, I opted to use mine instead so that I could streamline my code. now that EFT is out of the picture, I can delete all this confusing code and just rely on the CC company's sytsem to manage recurring billing, payment schedules, refunds, validations etc... CON 1: Although I can just delete the EFT code, it still takes time to remove the entire framework consolidates different payment systems. CON 2: with regards to PRO 3, it takes time to build functionality that integrates the payment system more closely with the CC company. CON 3: I feel insecure deleting all this work. I don't think I'll ever use it again. But, for some inexplicable reason, I just don't feel comfortable deleting this work "right now". So my question is, should I delete one month's worth recent development? If yes, should I do it immediately or wait X amount of time before doing so?

    Read the article

  • Gridview with row being edited causing error when form submitted

    - by Chris Phelps
    Using ASP.NET VB, I have a form with some text boxes and a Gridview. If a user clicks the Edit button on a row in the gridview, and then tries to submit the form with a row still in edit mode on the Gridview, this error is generated - "Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" % in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. " Any idea how to prevent this error??

    Read the article

  • How to sort the row contents on table cell by using date

    - by MS Nathan
    Hi i am new to iphone application development.i am developing RSS feed Reader it has number of different RSS feeds. In my application (XML parsing), i want to display the content of the row on cell for particular date and with their corresponding title, description (in my application, i am using three labels for displaying title, date and description) on table view cell after parsing xml data. And i want to sort the all kinds of RSS feeds row contents(title, date, description) depends upon the date in single another UIViewController and for each RSS feed has a separate ViewController. thanks in advance.

    Read the article

  • ksh : Need to delete multiple directories in parallel

    - by priya
    Hi , I have many directories and need to delete them periodically with minimum time. Additionally for each directories delete status need to know i.e whether deleted successfully or not. I need to write on the ksh . Could you please help me out. The sample code which I am using is not working. for var1 in 1...10 rm -rf & pid[var1]=$! done my_var=1 for my_var in 1...var1 wait $pid[my_var] if [ $? -eq 1 ] then echo falied else echo passed fi done

    Read the article

  • disable new row creation in datagrid view using c#

    - by syedsaleemss
    Im using c# .net windows forms application. i have a data grid view. It is connected to a database.It displays the contents of a selected table. Now if there are 4 rows in that table, it will display 4 rows. After this i am able to enter the 5th row in the datagrid view. It should be avoided. Now i have to disable creation of a new row. How can I do it?

    Read the article

  • Auto-fill the current date if the previous row was empty

    - by replax
    I have a spreadsheet sorted by dates. Everyday, I enter new data into it. After each day, I leave one row empty before starting the next day. Example: 20.09.12 XXXXX XXXXX XXXXX XXXX XXXXX XXXX XXXXX XX XX XXXXX XX XXXX 21.09.12 XXX XXXXX XXX XXXX X XXXX XXXX XXX 22.09.12 XXXX XX XXXX XXXX So I want excel to always fill in the current date whenever I enter data after one blank row, but obviously the dates shall stay the same - not be updated to the current date whenever I open excel. I am using Excel 2007 and while non vba ideas are preferred, vba is not a problem either!

    Read the article

  • How to get the Jquery row ID on single click

    - by kumar
    var value; $("#Grid1").click(function(e) { var row = jQuery(e.target).parent(); value= row.attr("id"); }); var onrowclick = function() { ("#Grid1").click($("#showgrid").load('/Names/Friends/satish/' + value)); }; i am trying to send the value on URL.. when I am giving like this I am not getting the output result... am I doing this correctly? is the problem that I am handling click event on same grid two times?

    Read the article

  • ASP.NET MVC - how to make users confirm the delete

    - by H4mm3rHead
    He, I have this page where i have checkboxes next to every item in a table, and want to allow the user to select some of them and press my delete button. I just cant come up with the jquery for making the confirm window and submitting only if 'yes' is pushed - this is my page <%Html.BeginForm(); %> <%List<ShopLandCore.Model.SLGroup> groups = (List<ShopLandCore.Model.SLGroup>)Model; %> <%Html.RenderPartial("AdminWorkHeader"); %> <table width="100%" id="ListTable" cellpadding="0" cellspacing="0"> <tr> <td colspan="5" class="heading"> <input type="submit" name="closeall" value="Close selected" /> <input type="submit" name="deleteall" value="Delete selected" /> </td> </tr> <tr> <th width="20px"> </th> <th> Name </th> <th> Description </th> <th width="150px"> Created </th> <th width="150px"> Closed </th> </tr> <%foreach (ShopLandCore.Model.SLGroup g in groups) { %> <tr> <td> <%=Html.CheckBox(g.Id.ToString()) %> </td> <td> <%=g.Name %> </td> <td> <%=g.Description %> </td> <td> <%=g.Created %> </td> <td> <%=g.Closed %> </td> </tr> <%} %> </table> <%Html.EndForm(); %> Please note that its only for the delete that it should confirm, and not necessarily for the close button.

    Read the article

  • problem with the deletion of uploaded images

    - by tibin
    i got this error when i tried to delete an image which i have uploaded "Forbidden You don't have permission to access /act-photo-delete.php on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.friendsjoint.com Port 80 " what will be the reason for this. i tried changing the chmods for the files. but nothing worked. is any one have an idea??? please help me....

    Read the article

  • Problem implementing a UITableView that allows for multiple row selections

    - by wgpubs
    This - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; int cardNumber = indexPath.row + 1; if (cell.accessoryType == UITableViewCellAccessoryNone) { cell.accessoryType = UITableViewCellAccessoryCheckmark; if (![self.winningNumbers containsObject:[NSNumber numberWithInt:cardNumber]]) [self.winningNumbers addObject:[NSNumber numberWithInt:cardNumber]]; } else { cell.accessoryType = UITableViewCellAccessoryNone; if ([self.winningNumbers containsObject:[NSNumber numberWithInt:cardNumber]]) [self.winningNumbers removeObject:[NSNumber numberWithInt:cardNumber]]; } [tableView deselectRowAtIndexPath:indexPath animated:YES]; } ... modifies the "accessoryType" of every 6th cell INSTEAD of just the selected row. What am I missing? Thanks

    Read the article

  • Entity Framework 4 - Delete Object

    - by GibboK
    I have 3 Tables in my DataBase CmsMasterPages CmsMasterPagesAdvSlots (Pure Juction Table) CmsAdvSlots Here a Picture of my EDM: I need find out all objects CmsAdvSlot connected with a CmsMasterPage (it is working in my code posted belove), and DELETE the result (CmsAdvSlot) from the DataBase. My Problem is I am not able to DELETE this Objects when I found theme. Error: The object cannot be deleted because it was not found in the ObjectStateManager. int findMasterPageId = Convert.ToInt32(uxMasterPagesListSelector.SelectedValue); CmsMasterPage myMasterPage = context.CmsMasterPages.FirstOrDefault(x => x.MasterPageId == findMasterPageId); var resultAdvSlots = myMasterPage.CmsAdvSlots; // It is working until here foreach (var toDeleteAdv in resultAdvSlots) { context.DeleteObject(myMasterPage.CmsAdvSlots.Any()); // ERORR HERE!! context.SaveChanges(); } Any idea how to solve it? Thanks for your time! :-)

    Read the article

  • Using LEFT JOIN to only selection one joined row

    - by Alex
    I'm trying to LEFT JOIN two tables, to get a list of all rows from TABLE_1 and ONE related row from TABLE_2. I have tried LEFT JOIN and GROUP BY c_id, however I wan't the related row from TABLE_2 to be sorted by isHeadOffice DESC. Here are some sample tables TABLE 1 c_id Name ---------------- 1 USA 2 Canada 3 England 4 France 5 Spain TABLE2 o_id c_id Office isHeadOffice ------------------------------------------------ 1 1 New York 1 2 1 Washington 0 3 1 Boston 0 4 2 Toronto 0 5 3 London 0 6 3 Manchester 1 7 4 Paris 1 8 4 Lyon 0 So what I am trying to get from this would be something like: RESULTS c_id Name Office ---------------------------- 1 USA New York 2 Canada Toronto 3 England Manchester 4 France Paris 5 Spain NULL I'm using PHP & MySQL. Any ideas?

    Read the article

  • IE event for right-click delete on <input> or <textarea>

    - by Jayraj
    What event is fired when you right-click on selected text in an <input> or <textarea> tag and the click "Delete" in Internet Explorer (I'm targeting version 9, but if it's good for lower versions too, all the better). On other browsers , the "input" event appears to work for all text changes through right-click so doing $("textarea").on("input", function() {...}); works. IE works for cut and paste, but not delete (JSFiddle here) although MDN claims that IE is supported.

    Read the article

  • Select one column from a row in hibernate

    - by ComfortablyNumb
    I am trying to do a simple query to get a unique result back in hibernate here is my code. public String getName(Integer id) { Session session = getSessionFactory().openSession(); String name = (String)session.createSQLQuery("SELECT name FROM users WHERE user_id = :userId").setParameter("userId", id).uniqueResult(); return name; } The name that is being returned is stored as HTML text that includes html syntacx language. I think this is what is causing the problem but it doesnt make sense I just want to return it as a string. It is only happening on this one field name, I can get every other field in the row but this one it gives me the error. I am getting an exception. The exception I am getting is No Dialect mapping for JDBC type: -1; nested exception is org.hibernate.HibernateException How do you query for a specific column on a row in hibernate?

    Read the article

  • Cannot add or update a child row: a foreign key constraint fails

    - by myaccount
    // Getting the id of the restaurant to which we are uploading the pictures $restaurant_id = intval($_GET['restaurant-id']); if(isset($_POST['submit'])) { $tmp_files = $_FILES['rest_pics']['tmp_name']; $target_files = $_FILES['rest_pics']['name']; $tmp_target = array_combine($tmp_files, $target_files); $upload_dir = $rest_pics_path; foreach($tmp_target as $tmp_file => $target_file) { if(move_uploaded_file($tmp_file, $upload_dir."/".$target_file)) { $sql = sprintf(" INSERT INTO rest_pics (branch_id, pic_name) VALUES ('%s', '%s')" , mysql_real_escape_string($restaurant_id) , mysql_real_escape_string(basename($target_file))); $result = mysql_query($sql) or die(mysql_error()); } I get the next error: Cannot add or update a child row: a foreign key constraint fails (rest_v2.rest_pics, CONSTRAINT rest_pics_ibfk_1 FOREIGN KEY (branch_id) REFERENCES rest_branches (branch_id) ON DELETE CASCADE ON UPDATE CASCADE However, this error totally disappears and everything goes well when I put directly the restaurant id (14 for example) instead of $restaurant_id variable in the sql query. The URL am getting the id from is: http://localhost/rest_v2/public_html/admin/add-delete-pics.php?restaurant-id=2 Any help please?

    Read the article

  • Table row height in Internet Explorer

    - by Fritz H
    I have the following table: <table> <tr> <td style="height: 7px; width: 7px"> A1 </td> <td style="height: 7px"> B1 </td> <td style="height: 7px; width: 7px"> C1 </td> </tr> <tr> <td style="width: 7px"> A2 </td> <td> B2 </td> <td style="width: 7px"> C2 </td> </tr> <tr> <td style="height: 7px; width: 7px"> A3 </td> <td style="height: 7px"> B3 </td> <td style="height: 7px; width: 7px"> C3 </td> </tr> </table> The basic idea is that the first row must be 7 pixels high. The left- and rightmost cells (A1 and C1) must be 7px wide, and the middle cell (B1) must scale according to the width of the table. The same goes for the bottom row (A3, B3, C3). The middle row, however, needs to scale in height - in other words, it needs to be (tableheight - 14px). The left- and rightmost cells (A2, C2) need to be 7 pixels wide. An example: 7px x 7px |------|-------------------------|------| --- +------+-------------------------+------+ | | | | | | 7px | | | | | | | | | --- +------+-------------------------+------+ | | | | | | | | | | | | | | | | | | | | | y | | | | | | | | | | | | | | | | | | | | | | | | --- +------+-------------------------+------+ | | | | | | 7px | | | | | | | | | --- +------+-------------------------+------+ HOWEVER: In Internet Explorer, the widths work fine (columns A and C are 7px, column B scales dynamically) - but the heights don't. Rows 1, 2 and 3 turn out to be exactly 33% of the height of the table, no matter what I do. Unfortunately I have to use this table, so replacing it with a set of DIVs is not an option. I have the following DOCTYPE: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> I need to keep this, as some other elements on the page rely on some complex CSS-based layouts. Can anyone point me in the right direction to whip this into shape for IE? EDIT: Should have mentioned earlier - this table is resized on the fly using javascript.

    Read the article

  • How to Delete Duplicate Rows in SQL 2000?

    - by Mikecancook
    I thought I had this figured out but it turns out I'm just deleting the first record. The following returns the duplicate rows. All have a count of 2. I just want to delete the first one for each duplicate record. select scorestudentid, scoreadvisor, scorecorrect, count(*) from scores where scoretestid = 3284 group by scorestudentid, scoreadvisor, scorecorrect having count(scorestudentid) > 1 Which returns: scorestudentid scoreadvisor scorecorrect no column name 13033719 28059 3.0 2 13033777 28086 3.0 2 13033826 28147 3.0 2 13033960 28023 3.0 2 So I put this together thinking it would work: set rowcount 1 delete from scores where scoretestid = 3284 and scorestudentid in ( select scorestudentid from scores where scoretestid = 3284 group by scorestudentid having count(scorestudentid) > 1) It really seems like it should be a simple concept but I'm not getting it.

    Read the article

  • identifying Button selection of each row in Tableview?

    - by senthilmuthu
    hi,i coded like - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UIButton *btn = [UIButton buttonWithType:UIButtonTypeRoundedRect]; btn.frame = CGRectMake(230.0f, 4.0f, 60.0f, 36.0f); [btn setTitle:@"OK" forState:UIControlStateNormal]; [btn setTitle:@"OK" forState:UIControlStateSelected]; [btn addTarget:self action:@selector(onClickRename:) forControlEvents:UIControlEventTouchUpInside]; [cell addSubview:btn]; return cell; } but if the user selects the button on particular row, i can change that image through onClickRename...but can i get inwhich row's image has been touched through (void)tableView:(UITableView )tableView didSelectRowAtIndexPath:(NSIndexPath)indexPath ?

    Read the article

< Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >