Search Results

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

Page 76/715 | < Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >

  • How to find specific row in MySQL query result?

    - by Šime Vidas
    So I do this to retrieve my entire table: $result = mysql_query( 'SELECT * FROM mytable' ); Then, in another part of my PHP-page, I do another query (for a specific row): $result2 = mysql_query( 'SELECT * FROM mytable WHERE id = ' . $id ); $row = mysql_fetch_array( $result2 ); So, I'm performing two querys. However, I don't really have to do that, do I? I mean, the row that I'm retrieving in my second query already is present in $result (the result of my first query), since it contains my entire table. Therefore, instead of doing the second query, I would like to extract the desired row from $result directly (while keeping $result itself in tact). How would I do that? OK, so this is how I've implemented it: function getRowById ( $result, $id ) { while ( $row = mysql_fetch_array( $result ) ) { if ( $row['id'] == $id ) { mysql_data_seek( $result, 0 ); return $row; } } }

    Read the article

  • How do I remove a <tr> with jQuery?

    - by George Edison
    Okay, I am really stuck here. I have a table of tr's that have id's: #tr_xx where xx is a number. item is a number. The if(... part makes sure that what follows is only executed once at the end of all the animations. $('#tr_' + item + '>td').fadeOut('slow', function() { if($('#tr_' + item + '>td:animated').length === 0) { $(this).parent().remove(); // This function recolors the rows // -not really related to this Recolor(); } }); The problem is that the tr does not get deleted. It just gets hidden. How can I delete the <tr> and not just hide it?

    Read the article

  • Count number of empty input boxes in table row

    - by Daniel Brink
    How do you calculate the number of input boxes with no value in a table row using jquery? example: <table id="table1"> <tr class="data" id="row5"> <td><input type="text" value="20%" /></td> <td><input type="text" value="10%" /></td> <td><input type="text" value="" /></td> <td><input type="text" /></td> </tr> <table> I'm looking for answer = 2

    Read the article

  • Adding a new row in between rows in a grid view.

    - by SARAVAN
    I have an ASP .net grid view. It has some template columns like a command button, a text box, and a dropdown control. When I click the command button, a new row needs to be inserted below the current row (from where I hit the command button). If I have rows 1 and 2 and I hit the command button in row1 a new row needs to be inserted between rows 1 and 2 Now in the new row I should be able to select values from dropdown and enter some value in a text box and finally hit my save button. (Which should work fine as I am expecting) The grid view is bound to some data source say for instance a datatable for now. Oneway that I could think about is when Command button is clicked, I can add a new row to the datatable in my server side code and rebind the grid. But I am not sure that, from a UI perspective how I can make sure that the new row goes exactly below the row from where I hit the command button. Any thoughts or comments?

    Read the article

  • delete,copy,rename files and directories in WINAPI ..?

    - by Kristian
    hi I made a code that search in a givin path for a certain file name or folder and print the value BUT now how can i modify it to instead of printing its name perform on of the operations ( delete,copy,rename ) I searched on google and found nothin. #include "stdafx.h" #include <windows.h> int _tmain(int argc, _TCHAR* argv[]) { TCHAR *fn; fn=L"d:\\*"; HANDLE f; WIN32_FIND_DATA data; f=FindFirstFile(fn,&data); if(f==INVALID_HANDLE_VALUE){ printf("not found\n"); return 0; } else{ _tprintf(L"found this file: %s\n",data.cFileName); } while(FindNextFile(f,&data)){ { _tprintf(L"found this file: %s\n",data.cFileName); } } } FindClose(f); return 0; }

    Read the article

  • Exception throws There is no row at position 0

    - by Nimantha Prasad
    I wanted to check user is valid or not.it gives me the exception,When user valid it's working without issue,But if user invalid there's some issue. Exception is : There is no row at position 0 Here is the part of the code, public bool CheckUserExistAndReporter(string user) { int reporterDnnId = -1; SMSFunctionController mysms = new SMSFunctionController(); DataSet uds = mysms.GetUsersUnitByUserName(user); reporterDnnId = Convert.ToInt32(uds.Tables[0].Rows[0]["DnnUserID"]); if (reporterDnnId > 0) { bool isValidUser = true; return isValidUser; } //else //{ //bool isValidUser =false; //return isValidUser; // } return false; } Then i call thatone here. if (!CheckUserExistAndReporter(user)) { ErrorLog(messageIn); msgOut = "ugyldig Bruker";//Invalid User. } what is the error ?

    Read the article

  • table row long press

    - by adoo42
    I have a table which is built dynamically based on how much data is present, if at all. I want to be able to long press anywhere on a the table row to be able to get some options to delete or edit etc. Is this possible? Remember I need to do all this without setting any XML as its dynamically built. Is this relevant to what I want to achieve? ` @override public boolean onKeyLongPress(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { // do your stuff here return true; } return super.onKeyLongPress(keyCode, event); } ` any advice is appreciated.

    Read the article

  • Best way to attach row from datagrid to EF.

    - by AKoran
    Using MVVM and EF...I have a datagrid binding to a View Model (using ObservableCollection). The view model has a save command which simply calls the SaveChanges command of the Data Context. However, when a user adds a new row to the datagrid, the new entity is detached. Is there any easy way to automatically attach it when it gets created. Currently, I'm having to do this in the Save command of my View Model and it seems a bit clunky: foreach (var dataItem in _DataList) // where _DataList is the ObservableCollection { if (dataItem.EntityState == EntityState.Detached) { _DataContext.AddToTestTables(dataItem); } } _DataContext.SaveChanges();

    Read the article

  • Delete the first line that matches a pattern

    - by gioele
    How can I use sed to delete only the first line that contains a certain pattern? For example, I want to remove the first line matching FAA from this document: 1. foo bar quuz 2. foo FAA bar (this should go) 3. quuz quuz FAA (this should remain) 4. quuz FAA bar (this should also remain) The result should be 1. foo bar quuz 3. quuz quuz FAA (this should remain) 4. quuz FAA bar (this should also remain) A solution for POSIX sed would be greatly appreciated, GNU sed is OK.

    Read the article

  • how to delete a image from iphone application

    - by pankaj
    I am working an iphone app where i am giving the option of downloading an image to user's iphone. Following is my code for downloading of image. UIImage *image = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:urlAddress]]]; NSString *pngFilePath = [[[NSString stringWithFormat:@"%@/",docDir] stringByAppendingString:[NSString stringWithFormat:@"%@",couponID]] stringByAppendingString:@".png"]; NSData *data1 = [NSData dataWithData:UIImagePNGRepresentation(image)]; [data1 writeToFile:pngFilePath atomically:YES]; My above code works fine but now i want to give option of deleting the image downloaded from above code. Can some one please advice me how can i delete a image file from iphone.

    Read the article

  • DataGridView that always has one row selected

    - by Dan Neely
    I'm using a DGV to show a list of images with text captions as a picklist. Their must always be a one and only one selection made in the list. I can't find a way to prevent the user from clearing the selection with a control-click on the selected row. Is there a property in the designer I'm missing that could do this? If I have to override the behavior in the mouse click events are there other ways the user could clear the current selection that need covered as well? Is there a third approach I could take that's less cumbersome than my second idea?

    Read the article

  • Remove specific box with jquery

    - by Opoe
    Hi all, When you click Add a box. It adds a box with a deletlistbtn. Right now it removes all boxes with the same name/class/var. But i want the button to only delete the box/list its in. Can anyone tell me wich code i should use to accomplish that? Right now i use this code; $('.deletelistbtn').live('click', function() { $(redbox).remove(); }); this is my entire code http://jsfiddle.net/XsCAN/

    Read the article

  • How to add indexes to MySQL tables?

    - by Michael
    I've got a very large MySQL table with about 150,000 rows of data. Currently, when I try and run SELECT * FROM table WHERE id = '1'; the code runs fine as the ID field is the primary index. However, recently for a development in the project, I have to search the database by another field. For example SELECT * FROM table WHERE product_id = '1'; This field was not previously indexed, however, I've added it as an index but when I try to run the above query, the results is very slow. An EXPLAIN query reveals that there is no index for the product_id field when I've already added one and as a result the query takes any where from 20 minutes to 30 minutes to return a single row. EDIT: My full EXPLAIN results are: | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+------+----------------------+------+---------+------+------+------------------+ | 1 | SIMPLE | table | ALL | NULL | NULL | NULL | NULL | 157211 | Using where | +----+-------------+-------+------+----------------------+------+---------+------+------+------------------+

    Read the article

  • Visual SVN/Tortoise 'Delete - keep local' problem.

    - by UpTheCreek
    I wanted to remove some files from the repository (while leaving them locally), and stop tracking them in the future. I tried this: - Used Tortoise 'Delete - Keep local' on the directory I wanted to remove from versioning. - Comitted to the repository. This commit failed with this error: commit failed... item is out of date Can anyone tell me a) What the correct procedure is for this? b) What can I do to get back to a working repository? Thank you!

    Read the article

  • multi row header on Google Visualizations

    - by Elzo Valugi
    I am trying to create a DataTable with a multi row header. I'll exemplify here: | 2008 | 2009 | --------------------------------------------------------- | price | qty. | price | qty | --------------------------------------------------------- | 93993 | 34434 | 34244 | 3434 | ..... The years headers can be fixed as I don't want to do sorting by that. Is there a way to do that in Google Visualizations? Update Attaching it with JS does NOT work, and it will disappear when sorting is done. $(".google-visualization-table-table").prepend("<tr class='google-visualization-table-tr-head'><td colspan='4'>something</tr>");

    Read the article

  • sql: DELETE + INSERT vs UPDATE + INSERT

    - by user93422
    A similar question has been asked, but since it always depends, I'm asking for my specific situation separately. I have a web-site page that shows some data that comes from a database, and to generate the data from that database I have to do some fairly complex multiple joins queries. The data is being updated once a day (nightly). I would like to pre-generate the data for the said view to speed up the page access. For that I am creating a table that contains exact data I need. Question: for my situation, is it reasonable to do complete table wipe followed by insert? or should I do update,insert? SQL wise seems like DELETE + INSERT will be easier (it is single SQL expression). EDIT: RDBMS: MS SQL Server 2008 Ent

    Read the article

  • Regex to delete HTML within <table> tags

    - by johnv
    I have an HTML document in .txt format containing multiple tables and other texts and I am trying to delete any HTML (anything within "<") if it's inside a table (between and ). For example: =================== other text <other HTML> <table> <b><u><i>bold underlined italic text</b></u></i> </table> other text <other HTML> ============== The final output would be as the following. Note that only HTML within and are removed. ============== other text <other HTML> <table> bold underlined italic text </table> other text <other HTML> ============= Any help is greatly appreciated!

    Read the article

  • Delete database. Entity Framework

    - by Idotz
    I have a very annoying issue and I would love a solution. The problem: I followed the MDSN tutorial- http://www.asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/adding-a-model Then I tried this guide according to my needs and I set up a database GAMES.MDF.   Then, I deleted the database and set it up again, is supposedly work (I can write and read data), but There is no such database in the APP_DATA folder. Like it keeps it somewhere in my PC and reuse it.   I even tried a new project and it did not work, works but not in the library, and it even uses the data I created before. I even deleted the DB from SQL Server Management Studio 2008. Does anyone know what the hell? How do I delete it permanently, not to remain any trace of him?   Thank you.  Ido

    Read the article

  • Group by clause return latest row information

    - by I Like PHP
    below is my table structure table_movie_info i_movie_id |movie_actor_id |movie_actress_id |movie_director_id | movie_producer_id 48 | 5 | 9 | 66 | 21 48 | 6 | 15 | 88 | 22 48 | 7 | 12 | 77 | 23 one more table is table_movie movie_id | movie_year | movie_genre_id |movie_rating 1 | 2009 | 6 | 8 2 | 2001 | 5 | 7.5 48 | 2007 | 3 | 6.8 now i need total movie information using both table,i write below query SELECT * FROM table_movie_info LEFT JOIN table_movie ON movie_id = i_movie_id WHERE i_movie_id=48 GROUP BY i_movie_id above query return only one row , but i need such type of information movie_id=48, actors_id list=5,6,7 acttress_id list=9,15,12 etc.. please tell me the optimized query which h return complete information i need. thanks for helping me always.

    Read the article

  • how delete all options except second in javascript

    - by Syom
    i have a select tag, with some options <select id="sel"> <option>text1</option> <option>text2</option> <option>text3</option> <option>text4</option> </select> i want to delete all options except second, i.e i want to get <select id="sel"> <option>text2</option> </select> i think it must looks something like this document.getElementById('sel').options.length= 0; but it deletes all list, so could you help me. thanks

    Read the article

  • Moving UITableView row to top of list when selected

    - by Max Kilgore
    I am sure this is an easy thing to do. I am very new to objective C (picked up a job the boss was going to outsource) and could use all the help I can get. Just point me in the right direction here. Basically what I want to set up is this: I have a list of phone numbers that expands to as many rows as needed. I have no problem populating and the list works fine, but I would like for all of the recently selected items in the list to be more easily accessible at the top. So, whenever the user "didSelectRowAtIndexPath", I would like the row to move to the top. I just KNOW this is super simple... but I haven't found the solution yet. No hurry. I am just trying to figure things out on my own. Thanks in advance!

    Read the article

  • Android/ORMLite Insert Row with ID

    - by Joe M
    I'm currently using ORMLite to work with a SQLite database on Android. As part of this I am downloading a bunch of data from a backend server and I'd like to have this data added to the SQLite database in the exact same format it is on the backend server (ie the IDs are the same, etc). So, my question to you is if I populate my database entry object (we'll call it Equipment), including Equipment's generatedId/primary key field via setId(), and I then run a DAO.create() with that Equipment entry will that ID be saved correctly? I tried it this way and it seems to me that this was not the case. If that is the case I will try again and look for other problems, but with the first few passes over the code I was not able to find one. So essentially, if I call DAO.create() on a database object with an ID set will that ID be sent to the database and if it is not, how can I insert a row with a primary key value already filled out? Thanks!

    Read the article

  • Python code to do csv file row entries comparison operations and count the number of times row value

    - by Venomancer
    have an excel based CSV file with two columns (or rows, Pythonically) that I am working on. What I need to do is to perform some operations so that I can compare the two data entries in each 'row'. To be more precise, one column has constant numbers all the way down, whereas the other column has varying values. So I need to count the number of times the varying column data entry values crosses the constant value on the other column. For example, fro the csv file i have two columns: Varying Column; Constant Column 24 25 26 25 crossed 27 25 26 25 25.5 25 23 25 crossed 26 25 crossed Thus, the varying column data entries have crossed 25 three times. I need to generate a code that can count the number of the crosses. Please do help out, Thanks.

    Read the article

  • Redirect to a link by clicking on a row which contains it

    - by Shymep
    I have a table <tr> <td>xxx</td> <td>yyy</td> <td><a href="javascript:__doPostBack('smth','')">Select</a></td> </tr> <tr> ...similar here </tr> My goal is to redirect to the select page link by clicking on the row. I was trying to implement such construction $("table tr").click(function() { $(this).find("a").click(); }); and also a few tricks with window.location but it didn't help. UPDATED: I'm getting errors like

    Read the article

  • LNK2005: delete already defined error in VC++

    - by user333422
    Hi, I asked this question earlier as well: http://stackoverflow.com/questions/2773168/lnk2005-delete-already-defined-error-in-vc The answer I got was that I should be using dynamic version of DLLs. I did that and it compiled fine. Now, but when I gave the exe to one of my colleagues to run, they told me - they can't run it as it requires some shared dll, so they need a static one. When I try to do static build then I get the error as mentioned in my previous link. Do, I need to provide some other file as well with exe. I have got .lib file as well in the build directory. Shall I provide taht one as well? I can run it fine on my m/c in whichever directory I put it. Any help is much appreciated as I am really stuck. Thanks in advance, Suchita

    Read the article

< Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >