Search Results

Search found 7311 results on 293 pages for 'rows'.

Page 10/293 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Saving selected rows in a jqGrid while paging

    - by Dan
    I have a jqGrid with which users will select records. A large number of records could be selected across multiple pages. The selected rows seem to get cleared out when the user pages through the data. Is it up to the developer to manually track the selected rows in an array? I'm fine doing this, but I'm not sure what the best way is. I'm not sure I want to be splicing an array whenever any number of records are selected as that seems like it could really slow things down. My end goal is to have a jQueryUI dialog that, when closed, while store all the selected rows so I can post it to the server. Insight, questions, comments; all are appreciated! Note: added aspnetmvc tag only because this is for an MVC app

    Read the article

  • Logging to MySQL without empty rows/skipped records?

    - by Lee Ward
    I'm trying to figure out how to make Squid proxy log to MySQL. I know ACL order is pretty important but I'm not sure if I understand exactly what ACLs are or do, it's difficult to explain, but hopefully you'll see where I'm going with this as you read! I have created the lines to make Squid interact with a helper in squid.conf as follows: external_acl_type mysql_log %LOGIN %SRC %PROTO %URI php /etc/squid3/custom/mysql_lg.php acl ex_log external mysql_log http_access allow ex_log The external ACL helper (mysql_lg.php) is a PHP script and is as follows: error_reporting(0); if (! defined(STDIN)) { define("STDIN", fopen("php://stdin", "r")); } $res = mysql_connect('localhost', 'squid', 'testsquidpw'); $dbres = mysql_select_db('squid', $res); while (!feof(STDIN)) { $line = trim(fgets(STDIN)); $fields = explode(' ', $line); $user = rawurldecode($fields[0]); $cli_ip = rawurldecode($fields[1]); $protocol = rawurldecode($fields[2]); $uri = rawurldecode($fields[3]); $q = "INSERT INTO logs (id, user, cli_ip, protocol, url) VALUES ('', '".$user."', '".$cli_ip."', '".$protocol."', '".$uri."');"; mysql_query($q) or die (mysql_error()); if ($fault) { fwrite(STDOUT, "ERR\n"); }; fwrite(STDOUT, "OK\n"); } The configuration I have right now looks like this: ## Authentication Handler auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp auth_param ntlm children 30 auth_param negotiate program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic auth_param negotiate children 5 # Allow squid to update log external_acl_type mysql_log %LOGIN %SRC %PROTO %URI php /etc/squid3/custom/mysql_lg.php acl ex_log external mysql_log http_access allow ex_log acl localnet src 172.16.45.0/24 acl AuthorizedUsers proxy_auth REQUIRED acl SSL_ports port 443 acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 # https acl CONNECT method CONNECT acl blockeddomain url_regex "/etc/squid3/bl.acl" http_access deny blockeddomain deny_info ERR_BAD_GENERAL blockeddomain # Deny requests to certain unsafe ports http_access deny !Safe_ports # Deny CONNECT to other than secure SSL ports http_access deny CONNECT !SSL_ports # Allow the internal network access to this proxy http_access allow localnet # Allow authorized users access to this proxy http_access allow AuthorizedUsers # FINAL RULE - Deny all other access to this proxy http_access deny all From testing, the closer to the bottom I place the logging lines the less it logs. Oftentimes, it even places empty rows in to the MySQL table. The file-based logs in /var/log/squid3/access.log are correct but many of the rows in the access logs are missing from the MySQL logs. I can't help but think it's down to the order I'm putting lines in because I want to log everything to MySQL, unauthenticated requests, blocked requests, which category blocked a specific request. The reason I want this in MySQL is because I'm trying to have everything managed via a custom web-based frontend and want to avoid using any shell commands and access to system log files if I can help it. The end result is to make it as easy as possible to maintain without keeping staff waiting on the phone whilst I add a new rule and reload the server! Hopefully someone can help me out here because this is very much a learning experience for me and I'm pretty stumped. Many thanks in advance for any help!

    Read the article

  • Adding new rows to a jQuery TableSorter with Pager

    - by macca1
    I have a basic table with the jQuery tableSorter on it in addition to a filter and pager: $("#myTable") .tablesorter({ debug: false, widgets: ['zebra'] }) .tablesorterFilter({ filterContainer: $("#filterBoxOne"), filterClearContainer: $("#filterClearOne"), filterColumns: [0, 1, 2], filterCaseSensitive: false }) .tablesorterPager({ container: $("#pagerOne"), positionFixed: false }); I'm trying to dynamically add a whole bunch of rows to it: function addRows() { $("#myTable tbody").append( $("#newRows").html() ); $("#myTable").trigger("update") .trigger("applyWidgets"); //.trigger("appendCache"); //tried this, didn't help } Everything is working fine except for the pager: it doesn't get updated when I add more rows, and upon clicking on one of the buttons (first, next, last, etc), the newly added rows disappear. Is there a way I can remove the pager and re-add it? Or is there some other way to achieve this?

    Read the article

  • SQl to list rows in not in another table

    - by SmartestVEGA
    I have the following query which have 1000 rows select staffdiscountstartdate,datediff(day,groupstartdate,staffdiscountstartdate),EmployeeID from tblEmployees where GroupStartDate < '20100301' and StaffDiscountStartDate '20100301' and datediff(day,groupstartdate,staffdiscountstartdate)1 order by staffdiscountstartdate desc i have the following query which have 400 rows: ie the employees in tblemployees and in tblcards select a.employeeid,b.employeeid from tblEmployees a,tblCards b where GroupStartDate < '20100301' and StaffDiscountStartDate '20100301' and datediff(day,groupstartdate,staffdiscountstartdate)1 and a.employeeid=b.employeeid How to list the employees which is there in tblemployees and not in tblcards? ie is 1000-400 = 600 rows ???

    Read the article

  • Join one row to multiple rows in another table

    - by Ghostrider
    I have a table to entities (lets call them people) and properties (one person can have an arbitrary number of properties). Ex: People Name Age -------- Jane 27 Joe 36 Jim 16 Properties Name Property ----------------- Jane Smart Jane Funny Jane Good-looking Joe Smart Joe Workaholic Jim Funny Jim Young I would like to write an efficient select that would select people based on age and return all or some of their properties. Ex: People older than 26 Name Properties Jane Smart, Funny, Good-looking Joe Smart, Workaholic It's also acceptable to return one of the properties and total property count. The query should be efficient: there are millions of rows in people table, hundreds of thousands of rows in properties table (so most people have no properties). There are hundreds of rows selected at a time. Is there any way to do it?

    Read the article

  • SQl to list rows if not in another table

    - by SmartestVEGA
    I have the following query which have 1000 rows select staffdiscountstartdate,datediff(day,groupstartdate,staffdiscountstartdate), EmployeeID from tblEmployees where GroupStartDate < '20100301' and StaffDiscountStartDate > '20100301' and datediff(day,groupstartdate,staffdiscountstartdate)>1 order by staffdiscountstartdate desc i have the following query which have 400 rows: ie the employees in tblemployees and in tblcards select a.employeeid,b.employeeid from tblEmployees a,tblCards b where GroupStartDate < '20100301' and StaffDiscountStartDate > '20100301' and datediff(day,groupstartdate,staffdiscountstartdate)>1 and a.employeeid=b.employeeid How to list the employees which is there in tblemployees and not in tblcards? ie is 1000-400 = 600 rows ???

    Read the article

  • Set bold rows in a QTreeView

    - by taynaron
    I have a custom subclass of a QTreeView in a pyqt application. I'm trying to give the user the ability to highlight and "lowlight" (for lack of a better term) rows. Highlighted rows should have bold text and (optionally) a different background color. Any ideas? I'm considering StyleSheets as an option, but have so far been unable to get that to work. If I set the QTreeView's stylesheet: self.setStyleSheet("QTreeView::item:selected {border: 1px solid #567dbc;}") I can't figure out how to manually enable 'states' that would keep only the desired rows at a particular state. If I try setting an individual item's stylesheet: #modelIndex is a valid QModelIndex modelIndex.internalPointer().setStyleSheet() I get a segfault. I'm not convinced stylesheets are the way to go, I'm open to all ideas. Thanks!

    Read the article

  • find rows that fall between a day and time of the week in sql server

    - by Corgalore
    I have a table of rows in MS SQL that contain a start and end day of the week, hour, and time. I need a T-SQL query that can pull rows from that table where GETDATE matches the day of week and time of those rows. Specifically, I need the query to work if a row has a day/time that starts on one day of the week and ends on the next day. Here's the structure I'm working with: _start_day_of_week (int) = 5_start_hour (int) = 15_start_minute (int) = 30 _end_day_of_week (int) = 6_end_hour (int) = 2 _end_minute (int) = 30 _title (string) = 'My Sample Row' _id (int) = 1 How would I retrieve this row given the current DATETIME?

    Read the article

  • concatenating strings from two different rows in a table

    - by Azeem
    Hello, We are attempting to rework the SQL in a product. The product stores XML in a table as follows: XML_STORAGE - UID IDENTITY - PARENT_ID INTEGER - SEQ INTEGER - XML VARCHAR(3800) The current way of doing this is as follows: Retrieve all ROWS for PARENT_ID = n. Then go over the fetched rows in the code and concatenate the XML strings into one large XML before parsing. The SEQ column is used to ORDER the result so the XML strings can be concatenated properly. Hopefully that is clear. What we are attempting to do is rework this so we can use a SQL variant to retrieve the whole string and just fetch one row back from DB2. Is there a DB2 function that will allow us to concatenate the string in all of these rows into one large string in the resultset. How would such a SQL look. Please let me know. Any help is much appreciated. Thanks! - Azeem

    Read the article

  • How to set JtextArea to keep fixed no of rows?

    - by Hippo
    How can i keep no of rows constant in text area. I need to create a console window for my application. If rows exceeds predefined no of rows first rows must get disposed. As if first written row will be destroyed first when i append anything which exceeds no of rows set. One more thing , i need to keep vertical scroll bar. That means no of rows must not be the whatever rows are visible when text area it opened. For example : - no of visible rows on view port are 30. It should keep 120 rows information, which will can be seen with the help of scroll bar.

    Read the article

  • MYSQL Convert rows to columns performance problem

    - by Tarski
    I am doing a query that converts rows to columns similar to this post but have encountered a performance problem. Here is the query:- SELECT Info.Customer, Answers.Answer, Answers.AnswerDescription, Details.Code1, Details.Code2, Details.Code3 FROM Info LEFT OUTER JOIN Answers ON Info.AnswerID = Answers.AnswerID LEFT OUTER JOIN (SELECT ReferenceNo, MAX(CASE DetailsIndicator WHEN 'cde1' THEN DetailsCode ELSE NULL END ) Code1, MAX(CASE DetailsIndicator WHEN 'cde2' THEN DetailsCode ELSE NULL END ) Code2, MAX(CASE DetailsIndicator WHEN 'cde3' THEN DetailsCode ELSE NULL END ) Code3 FROM DetailsData GROUP BY ReferenceNo) Details ON Info.ReferenceNo = Details.ReferenceNo There are less than 300 rows returned, but the Details table is about 180 thousand rows. The query takes 45 seconds to run and needs to take only a few seconds. When I type show processlist; into MYSQL it is hanging on "Sending Data". Any thoughts as to what the performance problem might be?

    Read the article

  • iPhone: Crash When Deleting UITableView Rows

    - by Ajeet Kumar Yadav
    Hi, I am new in iPhone development. I am developing an application that fetches a value from a database and displays it in a table view. I want to delete table rows one by one but the rows do not delete and the application crashes. Here is my row deletion code: - (void)tableView:(UITableView *)tv commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if(editingStyle == UITableViewCellEditingStyleDelete) { SanjeevKapoorAppDelegate *appDelegate =(SanjeevKapoorAppDelegate *)[[UIApplication sharedApplication] delegate]; list *animal =[appDelegate.list1 objectAtIndex:indexPath.row]; [appDelegate deleteCoffee]; [self.tableView reloadData]; //Delete the object from the table. [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; } I also delete all rows with this action: -(IBAction)deletebtn:(id)sender{ SanjeevKapoorAppDelegate *appDelegate =(SanjeevKapoorAppDelegate *)[[UIApplication sharedApplication] delegate]; [appDelegate deleteCoffee]; [self.tableView reloadData]; } How do I properly implement delete in an UITableView?

    Read the article

  • adding multiple rows to jquery Datatables dynamically

    - by arrowill12
    I am trying to add multiple rows at once to a jQuery Datatable. I would like to be able to create a string such as the one below and call a function to add these elements as rows in the table. Is there a function that will allow me to do this? var trString = "<tr class='custom class'><td></td><td></td></tr><tr class='custom class'><td></td><td></td></tr><tr class='custom class'><td></td><td></td></tr>" I have seen the fnAddData function but I would not be able to add my custom classes dynamically to the rows using that function. Also I have tried fnAddTr but I keep receiving an error saying my object does not have the method "getelementsByTagName" again, is there a function that will allow me to add a string of "" to a datatable?

    Read the article

  • Count the number of rows of a CSV file, with d3.js

    - by user2934073
    Suppose I have this CSV file Day,What 2013-10-27,Apple 2013-10-27,Cake 2013-10-27,Apple 2013-10-28,Apple 2013-10-28,Apple 2013-10-28,Blueberry 2013-10-28,Orange I would like to drawn with D3.js a time-series graph. All I need to do is to display the sum of the number of rows for each day. As an example, the 27 of November should have 3 as value, the 28th should have 4. Is there a way I can archive it? I've been trying to create a new dataset out of the CSV one with no positive results. var dataset; d3.csv("data.csv", function(d) { return { Day: new Date(d.Day), What: d.What }; }, function(error, rows) { dataset = rows; // I SUPPOSE THE FUNCTION THAT GENERATE THE NEW DATASET SHOULD GO THERE });

    Read the article

  • Using VirtualMode on a DataGridView when the number of rows/columns isn't known

    - by Nathan Baulch
    I need to display an unknown length sequence of dictionaries with unknown keys efficiently in a data grid. This sequence is the result of a potentially slow LINQ query that could contain any number of results. At first I thought that VirtualMode on DataGridView was what I was looking for but it appears that the number of rows and columns must be known upfront. I tried adding a single row and column then adding more as needed from the CellValueNeeded event but this doesn't work. Is this even possible with VirtualMode? Or do I need to estimate how many rows are visible on the screen and manually build up the rows/columns? And if so, how do I ensure that a vertical scrollbar is present and react appropriately when a user uses it?

    Read the article

  • NSTableView - Trying to fit exactly 9 rows

    - by Justin808
    Hi, I'm trying to size the rows of a NSTableView to exactly 9 rows fit. I've tried [menuTableView setRowHeight:floor(menuRect.size.height / 9)]; and I've tried [menuTableView setRowHeight:(menuRect.size.height / 9)]; and [menuTableView setRowHeight:ceil(menuRect.size.height / 9)]; but all of them have the same issue, if I've selected row 0 then row 9 is clipped at the bottom and if I select row 9 then row 0 is clipped at the top. How can I set up a NSTableView to show 9 full rows so no matter what there is never a partial row visible? Thanks, edit: Yes menuRect is the frame for the menuTableView

    Read the article

  • How to invert rows and columns using a T-SQL Pivot Table

    - by Jeff Stock
    I have a query that returns one row. However, I want to invert the rows and columns, meaning show the rows as columns and columns as rows. I think the best way to do this is to use a pivot table, which I am no expert in. Here is my simple query: SELECT Period1, Period2, Period3 FROM GL.Actuals WHERE Year = 2009 AND Account = '001-4000-50031' Results (with headers): Period1, Period2, Period3 612.58, 681.36, 676.42 I would like for the results to look like this: Desired Results: Period, Amount Period1, 612.58 Period2, 681.36 Period3, 676.42 This is a simple example, but what I'm really after is a bit more comlex than this. I realize I could produce theses results by using several SELECT commands instead. I'm just hoping someone can shine some light on how to accomplish this with a Pivot Table or if there is yet a better way.

    Read the article

  • How to get number of rows deleted from mysql in shell script

    - by simonlord
    Hi all I can't work out how to get the mysql client to return the number of rows deleted to the shell when running a delete. Does anyone know what option will enable this? Or ways around it? Here's what i'm trying, but i get no output: #!/bin/bash deleted=`mysql mydb -e "delete from mytable where insertedtime < '2010-04-01 00:00:00'"|tail -n 1` I was expecting something like this as the output from mysql: deleted 999999 Which is why i have the tail -n 1 so i only pick up the count and not the column name. When running the command by hand (mysql mydb -e "delete from mytable where insertedtime < '2010-04-01 00:00:00'") there is no output. When running the command interactively when running the mysql client i ge the following: mysql>delete from mytable where insertedtime < '2010-04-01 00:00:00'; Query OK, 0 rows affected (0.00 sec) I want to get the rows affected count into my shell variable. Any help would be most appreciated.

    Read the article

  • Combining query rows in a loop

    - by icemanind
    I have the following ColdFusion 9 code: <cfloop from="1" to="#arrayLen(tagArray)#" index="i"> <cfquery name="qryGetSPFAQs" datasource="#application.datasource#"> EXEC searchFAQ '#tagArray[i]#' </cfquery> </cfloop> The EXEC executes a stored procedure on the database server, which returns rows of data, depending on what the parameter is. What I am trying to do is combine the queries into one query object. In other words, if it loops 3 times and each loop returns 4 rows, I want a query object that has all 12 rows in one object. How do I acheive this?

    Read the article

  • Propel: How the "Affected Rows" Returned from doUpdate is defined

    - by Ngu Soon Hui
    In propel there is this doUpdate function, that will return the numbers of affected rows by this query. The question is, if there is no need to update the row ( because the set value is already the same as the field value), will those rows counted as the affected row? Take for example, I have the following table: ID | Name | Books 1 | S1oon | Me 2 | S1oon | Me Let's assume that I write a ORM function of the equivalent of the following query: update `new table` set Books='Me' where Name='S1oon'; What will the doUpdate result return? Will it return 0 ( because all the Books column are already Me, hence there is no need to update), or will it be 2 ( because there are 2 rows that fulfill the where condition) ?

    Read the article

  • Insert new row with data computed from other rows

    - by Tyler McHenry
    Suppose I have a MySQL table called MyTable, that looks like this: +----+------+-------+ | Id | Type | Value | +----+------+-------+ | 0 | A | 1 | | 0 | B | 1 | | 1 | A | 2 | | 1 | B | 3 | | 2 | A | 5 | | 2 | B | 8 | +----+------+-------+ And, for each Id, I want to insert a new row with type C whose Value is the sum of the type A and B values for the rows of the same Id. The primary key on this table is (Id, Type), so there's no question of duplication of Id,Type pairs. I can create the rows I want with this query: SELECT MyTable_A.Id AS Id, 'C' AS Type, (A_Val + B_Val) AS Value FROM (SELECT Id, Value AS A_Val FROM MyTable WHERE Type='A') AS MyTable_A JOIN (SELECT Id, Value AS B_Val FROM MyTable WHERE Type='B') AS MyTable_B ON MyTable_A.Id = MyTable_B.Id Giving: +----+------+-------+ | Id | Type | Value | +----+------+-------+ | 0 | C | 2 | | 1 | C | 5 | | 2 | C | 13 | +----+------+-------+ But the question is: How do I use this result to insert the generated type-C rows into MyTable? Is there a relatively simple way to do this with a query, or do I need to write a stored procedure? And if the latter, guidance would be helpful, as I'm not too well versed in them.

    Read the article

  • deleting a large number of rows from a table

    - by Azeem
    We have a requirement to delete rows in the order of millions from multiple tables as a batch job (note that we are not deleting all the rows, we are deleting based on a timestamp stored in an indexed column). Obviously a normal DELETE takes forever (because of logging, referential constraint checking etc.). I know in the LUW world, we have ALTER TABLE NOT LOGGED INITIALLY but I can't seem to find the an equivalent SQL statement for DB2 v8 z/OS. Any one has any ideas on how to do this really fast? Also, any ideas on how to avoid the referential checks when deleting the rows? Please let me know.

    Read the article

  • Getting Top (starting no , Ending no) rows from sqlserver

    - by Krishna Thota
    I'm using Grid view in my asp.net page and I'm fetching data from SQL Server and placing in my grid view. Now my problem is, I'm using paging and placing 50 rows per page in Grid view. I would like to fetch top 50 rows from database in the start up and bind to the Grid View and when i click on next page, then again go to the database and fetch Second Top 50 rows and bind to GV. and this process hasto continue until last row is fetched from Database. Can you tell me How to write Query in achieving this??

    Read the article

  • Archiving rows dynamically

    - by Serge
    I was wondering what would be the best solution to dynamically archive rows. For instance when a user marks a task as completed, that task needs to be archived yet still accessible. What would be the best practices for achieving this? Should I just leave it all in the same table and leave out completed tasks from the queries? I'm afraid that over time the table will become huge (1,000,000 rows in a year or less). Or should I create another table ie task_archive and query that row whenever data is needed from it? I know similar questions have been asked before but most of them where about archiving thousands of rows simultaneously, I just need to know what would be the best method (and why) to archive 1 row at a time once it's been marked completed

    Read the article

  • MySQL returns fewer rows with GROUP BY statement

    - by bschaeffer
    I've got a MySQL database that stores image information. Right now it only has three rows stored in the database, and each row is associated with something like, for instance, a unique blog post via a key column. As of right now, one "blog post key" has one image, and one has two images in the database. When I run this query, MySQL returns all three rows. SELECT `id`, `key`, `url` FROM (`images`) WHERE `key` = 'TpaS4G5h' OR `key` = '78855e44' However, when i add the GROUP BY statement I only get two rows... one for each key. SELECT `id`, `key`, `url` FROM (`images`) WHERE `key` = 'TpaS4G5h' OR `key` = '78855e44' GROUP BY `key` I'm sure there is a simple solution, but I don't know what it is... so any help would be really appreciated. Thanks in advance!

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >