Search Results

Search found 24890 results on 996 pages for 'pivot table'.

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

  • MYSQL Query with 2 columns in Table A related to 1 column in Table B

    - by CYREX
    I have 2 Tables, User and Mail. In User Table i have 2 columns that i will use, the ID column which makes the relation with the Mail Table and it is the Index of User Table and the Name column. In Mail Table i have Receiver Column and Sender Column. Both columns, Receiver and Sender have a number that relates to the ID Column in the User Table. In the User Table is where the name columns resides and i want to make a query that shows me the Receiver and Sender Columns but with the name of the user, not the ID. Up to this point i have this: SELECT name AS Send, name AS Receive FROM mail,user WHERE sender=guid; I know there is still a part of the query missing but i can not figure out what else to put to tell it to show in the SEND output column the name of the sender and in the RECEIVE output column the name of the receiver.

    Read the article

  • HOw Do I update from table-2 to table-1

    - by mathew
    HI what is the wrong in this code?? i have set it 24 hours to update the value in the table.but the problem is if $row is empty then it inserts value from table-2 but after 24 hours it wont update the value. what I want is it must delete the existing value and insert new one(random value) or it must update the same $row with new value what ever... if ($row == 0){ mysql_query("INSERT INTO table-1 (regtime,person,location,address,rank,ip,geocode) SELECT NOW(),person,location,address,rank,ip,geocode FROM table-2 ORDER BY RAND() LIMIT 1");}else{ mysql_query("UPDATE table-1 SELECT regtime=NOW(), person=person, location=location, address=address, rank=rank, ip=ip, geocode=geocode FROM table-2 ORDER BY RAND() LIMIT 1");}

    Read the article

  • "Disabling" an HTML table with javascript

    - by Blair Jones
    I've seen this done in a lot of sites recently, but can't seem to track one down. Essentially I want to "disable" an entire panel (that's in the form on an HTML table) when a button is clicked. By disable I mean I don't want the form elements within the table to be usable and I want the table to sort of fade out. I've been able to accomplish this by putting a "veil" over the table with an absolutely positioned div that has a white background with a low opacity (so you can see the table behind it, but can't click anything because the div is in front of it). This also adds the faded effect that I want. However, when I set the height of the veil to 100% it only goes to the size of my screen (not including the scrolling), so if a user scrolls up or down, they see the edge of the veil and that's not pretty. I'm assuming this is typically done in a different fashion. Does anyone have some suggestions as a better way to accomplish this?

    Read the article

  • Inserting a table column with jQuery

    - by fudgey
    I have a table of data that I need to dynamically add a column to. Lets say I have this basic table to start with: <table> <tr><td>cell 1</td><td>cell 2</td><td>cell 3</td></tr> <tr><td>cell 1</td><td>cell 2</td><td>cell 3</td></tr> <tr><td>cell 1</td><td>cell 2</td><td>cell 3</td></tr> </table> I would like to insert a column between cell 1 and cell 2 in each row... I've tried this but it just isn't working like I expect... maybe I need more caffeine. $(document).ready(function(){ $('table').find('tr').each(function(){ $(this).prepend('<td>cell 1a</td>'); }) })

    Read the article

  • Help finding table cell using locator after tableCellAddress finds the cell

    - by Greg Weinman
    Hi All, I have a JSP page populated by javascript resulting in a typical table element cascade . After population I see the text I want using getTable("tableLister.listTable.1.1") The table also has a class=clsDisplayTableBody. I want to click the check box in column 0 for the row of interest. However, all of these tests fail isElementPresent("//*[text()="+cellContents+"]/../td[0]")) isElementPresent("//table[@class='clsDisplayTableBody']//tr[1]/td[0]")) isElementPresent("css='clsDisplayTableBody' tr:nth-child(1) td:nth-child(0)")) isElementPresent("//xpath=id('tableLister.listTable')/descendant::tr[1]/descendant::td[0]")) isElementPresent("//table[@id='tableLister.listTable']//tbody/tr[1]/td[0]")) isElementPresent("//table[@id='tableLister.listTable']//tr[1]/td[0]")) Is there anything else I could try? Regards, Greg Weinman

    Read the article

  • Problem with table resizing after automatically removing from jquery one column (this only happens i

    - by user297433
    Hi. I have a table with some columns. Something like this: tr1td1 one remove button tr1td2 one remove button ... The table has the size of the div#outer When I click remove button I remove with jquery the entire column . In Firefox everything's fine the table's columns resize to fill the div but in Internet Explorer the table's columns remain just as they are. It's like the browser doesn't refresh the css style. Because if I refresh the page the table looks just as it shoud be. Any ideas?

    Read the article

  • Long html table looses its background image

    - by Alegro
    I have about 7500 (short) text lines in a table cell. The table looses its background image on about 1800th line. Is there a limit about the table's length? Text in the cell stays visible till end, but without background. Table is named #story. #story{ margin-top:15px; border:medium ridge #FFF; border-radius:9px; background-image:url(img/back01.jpg); } Also tried: background: url("img/back01.jpg") repeat; // without result background-color:#FFF; // this works along the whole table. }

    Read the article

  • replacing data.frame element-wise operations with data.table (that used rowname)

    - by Harold
    So lets say I have the following data.frames: df1 <- data.frame(y = 1:10, z = rnorm(10), row.names = letters[1:10]) df2 <- data.frame(y = c(rep(2, 5), rep(5, 5)), z = rnorm(10), row.names = letters[1:10]) And perhaps the "equivalent" data.tables: dt1 <- data.table(x = rownames(df1), df1, key = 'x') dt2 <- data.table(x = rownames(df2), df2, key = 'x') If I want to do element-wise operations between df1 and df2, they look something like dfRes <- df1 / df2 And rownames() is preserved: R> head(dfRes) y z a 0.5 3.1405463 b 1.0 1.2925200 c 1.5 1.4137930 d 2.0 -0.5532855 e 2.5 -0.0998303 f 1.2 -1.6236294 My poor understanding of data.table says the same operation should look like this: dtRes <- dt1[, !'x', with = F] / dt2[, !'x', with = F] dtRes[, x := dt1[,x,]] setkey(dtRes, x) (setkey optional) Is there a more data.table-esque way of doing this? As a slightly related aside, more generally, I would have other columns such as factors in each data.table and I would like to omit those columns while doing the element-wise operations, but still have them in the result. Does this make sense? Thanks!

    Read the article

  • latex table reference

    - by Tim
    Hi, I wrote a long table with a label in a tex file and \input it into my main tex file. The reference in the main tex file to the table, however, does not show the numbering of the table but the one of the next table that are written directly in the main tex file. All long tables that are written directly in the main tex file have correct references. How to fix my problem? Must the label be defined in the same tex file as its reference? Thanks and regards! The label is \label{tab:yy}, and the reference is \ref{tab:yy}, and every table has a distinct label.

    Read the article

  • I've got to update a column in one SQL table with a counter stored in another table, and update that

    - by Bucket
    I'm using SQL server 2005 (for testing) & 2007 (for production). I have to add a unique record ID to all the records in my table, in an existing column, using a "last record ID" column from another table. So, I'm going to do some sort of UPDATE of my table, but I have to get the "last record ID" from the other table, increment it, update THAT table and then update my record. Can anyone give me an example of how to do this? Other users may be incrementing the counter also.

    Read the article

  • Persistent SQL Table lock from C#

    - by Chris
    I'm trying to create a persistent SQL (SQL Server 2005) lock on a table level. I'm not updating/querying the specified table, but I need to prevent a third party application from updating the locked table as a means to prevent transactions from being posted (the table I wish to lock is the key on their transaction that interferes with my processing). From my experience the table is only locked for the time a specific transaction is taking place. Any ideas? The 3rd party developer has logged this feature as an enhancement, but since they are in the middle of rolling out a major release I can expect to wait at least 6 months for this. I know that this isn't a great solution, since their software will fall over but it is of a critical enough nature that we're willing to live with the consequences.

    Read the article

  • A lot of TCP: time wait bucket table overflow in CentOS 6

    - by divaka
    we have the following output from dmesg: __ratelimit: 33491 callbacks suppressed TCP: time wait bucket table overflow TCP: time wait bucket table overflow TCP: time wait bucket table overflow TCP: time wait bucket table overflow TCP: time wait bucket table overflow TCP: time wait bucket table overflow TCP: time wait bucket table overflow TCP: time wait bucket table overflow TCP: time wait bucket table overflow TCP: time wait bucket table overflow Also we have the following setting: cat /proc/sys/net/ipv4/tcp_max_tw_buckets 524288 We are under some kind of attack, but we could not detect what cause this problem?

    Read the article

  • Nested table height in TCPDF

    - by Kuroki Kaze
    Is it possible to make nested table fit height of its parent cell in TCPDF? My code: <?php require_once('tcpdf/config/lang/eng.php'); require_once('tcpdf/tcpdf.php'); $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); $pdf->SetFont('times', 'BI', 8); $pdf->AddPage(); $pdf->writeHTML('<table> <tr><td bgcolor="gray"> Angoisse et vif espoir, sans humeur factieuse.<br/> Plus allait se vidant le fatal sablier,<br/> Plus ma torture était âpre et délicieuse;<br/> Tout mon coeur s’arrachait au monde familier</td> <td bgcolor="lightgray">Second</td> <td bgcolor="gray">Third</td> <td> <table style="height: 100%"> <tr bgcolor="blue" style="height: 30%"><td bgcolor="yellow" style="height: 30%">Ichi</td></tr> <tr bgcolor="white" style="height: 30%"><td bgcolor="cyan" style="height: 30%">Ni</td></tr> <tr bgcolor="blue" style="height: 30%"><td bgcolor="yellow" style="height: 30%">San</td></tr> </table> </td></tr> </table>'); $pdf->Output('example_002.pdf', 'I'); ?> I want table in last cell to fill it entirely. Is there any way to do this?

    Read the article

  • Is there any other efficient way to use table variable instead of using temporary table

    - by varta shrimali
    we are writing script to display banners on a web page where we are using temporary table in mysql procedure. Is there any other efficient way to use table variable instead of using temporary table we are using following code: -- banner location CURSOR -- DECLARE banner_location_cursor CURSOR FOR select bm.id as masterId, bm.section as masterName, bs.id as locationId, bs.sectionName as locationName from banner_master as bm inner join banner_section as bs on bm.id=bs.masterId where bm.section=sCode ; -- DECLARE banner CURSORS DECLARE banner_cursor CURSOR FOR SELECT bd.id as bannerId, bd.sectionId, bd.bannerName, bd.websiteURL, bd.paymentType, bd.status, bd.startDate, bd.endDate, bd.bannerDisplayed, bs.id, bs.sectionName from banner_detail as bd inner join banner_section as bs on bs.id=bd.sectionId where bs.id= location_id and bd.status='A' and (dates between cast(bd.startDate as DATE) and cast(bd.endDate as DATE)) order by rand(), bd.bannerDisplayed asc limit 1 ; DECLARE CONTINUE HANDLER FOR NOT FOUND SET no_more_rows = 1; SET dates = (select curdate()); -- RESULTS TABLE WHICH WILL BE RETURNED -- CREATE temporary TABLE test ( b_id INT, s_id INT, b_name varchar(128), w_url varchar(128), p_type varchar(128), st char(1), s_date datetime, e_date datetime, b_display int, sec_id int, s_name varchar(128) ); -- OPEN banner location CURSOR OPEN banner_location_cursor; the_loop: LOOP FETCH banner_location_cursor INTO master_id, master_name, location_id, location_name; IF no_more_rows THEN CLOSE banner_location_cursor; leave the_loop; END IF; OPEN banner_cursor; -- select FOUND_ROWS(); the_loop2: LOOP FETCH banner_cursor INTO banner_id, section_id, banner_name, website_url, payment, status, start_date, end_date, banner_displayed, sec_id, section_name; IF no_more_rows THEN set no_more_rows = 0; CLOSE banner_cursor; leave the_loop2; END IF; INSERT INTO test ( b_id, s_id, b_name , w_url, p_type, st, s_date, e_date, b_display, sec_id, s_name ) VALUES ( banner_id, section_id, banner_name, website_url, payment, status, start_date, end_date, banner_displayed, sec_id, section_name ); UPDATE banner_detail set bannerDisplayed = (banner_displayed+1) where id = banner_id; END LOOP the_loop2; END LOOP the_loop; -- RETURN result SELECT * FROM test; -- DROP RESULTS TABLE DROP TABLE test; END

    Read the article

  • How can I convince IE to honor my explicit instructions to make a table column X pixels wide? [migrated]

    - by AnthonyWJones
    Please consider this small but complete chunk of HTML: <!DOCTYPE html > <html> <head> <title>Test</title> <style type="text/css"> span {overflow:hidden; white-space:nowrap; } td {overflow:hidden; text-overflow:ellipsis} </style> </head> <body> <table cellspacing="0" > <tbody> <tr> <td nowrap="nowrap" style="max-width:30px; width:30px; white-space:nowrap; "><span>column 1</span></td> <td nowrap="nowrap" style="max-width:30px; width:30px; white-space:nowrap; "><span>column 2</span></td> <td nowrap="nowrap" style="max-width:30px; width:30px; white-space:nowrap; "><span>column 3</span></td> </tr> </tbody> </table> </body> </html> If you render the above in Chrome you'll see the effect I'm looking for. However render it in IE8 or 9 the width and/or max-width is ignored. So my question is how do get IE to simply let me specify the width of a cell explicitly? BTW, I've tried various combinations of table-layout:fixed and using colgroup with cols and all sorts, nothing I've tried convinces IE to what I'm clearly asking it to explicitly do? If I had any hair before starting this I wouldn't have any left by now.

    Read the article

  • How to bind an ADF Table on button click

    - by Juan Manuel Formoso
    Coming from ASP.NET I'm having a hard time with basic ADF concepts. I need to bind a table on a button click, and for some reason I don't understand (I'm leaning towards page life cycle, which I guess is different from ASP.NET) it's not working. This is my ADF code: <af:commandButton text="#{viewcontrollerBundle.CMD_SEARCH}" id="cmdSearch" action="#{backingBeanScope.indexBean.cmdSearch_click}" partialSubmit="true"/> <af:table var="row" rowBandingInterval="0" id="t1" value="#{backingBeanScope.indexBean.transactionList}" partialTriggers="::cmdSearch" binding="#{backingBeanScope.indexBean.table}"> <af:column sortable="false" headerText="idTransaction" id="c2"> <af:outputText value="#{row.idTransaction}" id="ot4"/> </af:column> <af:column sortable="false" headerText="referenceCode" id="c5"> <af:outputText value="#{row.referenceCode}" id="ot7"/> </af:column> </af:table> This is cmdSearch_click: public String cmdSearch_click() { List l = new ArrayList(); Transaction t = new Transaction(); t.setIdTransaction(BigDecimal.valueOf(1)); t.setReferenceCode("AAA"); l.add(t); t = new Transaction(); t.setIdTransaction(BigDecimal.valueOf(2)); t.setReferenceCode("BBB"); l.add(t); setTransactionList(l); // AdfFacesContext.getCurrentInstance().addPartialTarget(table); return null; } The commented line also doesn't work. If I populate the list on my Bean's constructor, the table renders ok. Any ideas?

    Read the article

  • Need help with many-to-many relationships....

    - by yuudachi
    I have a student and faculty table. The primary key for student is studendID (SID) and faculty's primary key is facultyID, naturally. Student has an advisor column and a requested advisor column, which are foreign key to faculty. That's simple enough, right? However, now I have to throw in dates. I want to be able to view who their advisor was for a certain quarter (such as 2009 Winter) and who they had requested. The result will be a table like this: Year | Term | SID | Current | Requested ------------------------------------------------ 2009 | Winter | 860123456 | 1 | NULL 2009 | Winter | 860445566 | 3 | NULL 2009 | Winter | 860369147 | 5 | 1 And then if I feel like it, I could also go ahead and view a different year and a different term. I am not sure how these new table(s) will look like. Will there be a year table with three columns that are Fall, Spring and Winter? And what will the Fall, Spring, Winter table have? I am new to the art of tables, so this is baffling me... Also, I feel I should clarify how the site works so far now. Admin can approve student requests, and what happens is that the student's current advisor gets overwritten with their request. However, I think I should not do that anymore, right?

    Read the article

  • Query to look up comment in one table, username in another table

    - by John
    Hello, I am using a MySQL table called "login" with the following structure: loginid, username, password, email, actcode, disabled, activated, created, points I am using another MySQL table called "comment" with the following structure: commentid, loginid, submissionid, comment, datecommented For a given "submisssionid", I would like to print out the following information from the table "comment": -The fields "comment" and "datecommented". At the same time, I would like to print out the following from the table "login": -The "username" that corresponds to the "loginid" for each row being row being selected from the table "comment". How can I do this? I tried the code below but it did not work. Thanks in advance, John $submission = mysql_real_escape_string($_GET['submission']); $submissionid = mysql_real_escape_string($_GET['submissionid']); $sqlStr = "SELECT c.loginid ,c.submissionid ,c.comment ,c.datecommented ,l.username ,COUNT(c.commentid) countComments FROM comment c WHERE c.submissionid = $submissionid INNER JOIN login l ON c.loginid = l.loginid GROUP BY c.submissionid ORDER BY c.datecommented DESC LIMIT 100"; $result = mysql_query($sqlStr); $arr = array(); echo "<table class=\"samplesrec\">"; while ($row = mysql_fetch_array($result)) { echo '<tr>'; echo '<td class="sitename1">'.$row["comment"].'</td>'; echo '</tr>'; echo '<tr>'; echo '<td class="sitename2"><a href="http://www...com/sandbox/members/index.php?profile='.$row["username"].'">'.$row["username"].'</a>'.$row["datecommented"].'</td>'; echo '</tr>'; } echo "</table>";

    Read the article

  • HTML table with auto-fit for some columns, fixed width for others

    - by sangil
    I'm trying to create a table adhering to the following requirements: The table width must be defined as 0 - the browser should calculate the width according to the column widths (this is to accommodate a column-resize plugin). Some columns may receive a fixed width (e.g. 50px); Columns that do not receive a fixed width, must auto-fit to the content. I have created a small example to illustrate the problem - as you can see column 3 stays at width 0 and so is not visible. HTML <table> <tr> <td class="cell header" id="header1">Header 1</td> <td class="cell header" id="header2">Header 2</td> <td class="cell header" id="header3">Header 3</td> </tr> <tr> <td class="cell">Cell 1</td> <td class="cell">Cell 2</td> <td class="cell">Very looooong content</td> </tr> </table> CSS table { table-layout: fixed; width: 100%; border: 1px solid #696969; } .cell { color: #898989; border: 1px solid #888; padding: 2px; overflow: hidden; } .header { background-color: lightsteelblue; color: black; } #header1, #header2 { width: 50px; } Is this even possible? Any help would be appreciated...

    Read the article

  • Striped table rows in ASP.NET MVC (without using jQuery or equivalent)

    - by Richard Ev
    When using an ASP.NET WebForms ListView control to display data in an HTML table I use the following technique in to "stripe" the table rows: <ItemTemplate> <tr class="<%# Container.DisplayIndex % 2 == 0 ? "" : "alternate" %>"> <!-- table cells in here --> </tr> </ItemTemplate> With the following CSS: tr.alternate { background-color: #EFF5FB; } I have just gone through the ASP.NET MVC Movie Database Application tutorial and learnt that in MVC-land table rows can be (must be?) constructed as follows: <% foreach (var item in Model) { %> <tr> <td> <%= Html.Encode(item.Title) %> </td> <!-- and so on for the rest of the table cells... --> </tr> <% } %> What can I add to this code to stripe the rows of my table? Note: I know that this can be done using jQuery, I want to know if it can be done another way. Edit If jQuery (or equivalent) is in your opinion the best or most appropriate post, I'd be interested in knowing why.

    Read the article

  • Create Dynamically table at runtime & save it in database

    - by user1548245
    I have written a code for creating table. It displays table structure on GUI form, but what I want is, when I enter values into table it should be stored in database table too. My code: <?php function display($column,$rows) { echo "<table border='1' align='center'>"; for ($iii = 0;$iii <$_POST['column'];$iii++) { echo "<tr>".$jjj."</tr>"; //display no. of <tr> for ($jjj = 0; $jjj <$_POST['rows'];$jjj++) { echo "<td>" ."<input type=\"text\" name='$iii'>"."</td>"; } } echo "</table>"; } ?>

    Read the article

  • Multiple Foreign keys to a single table and single key pointing to more than one table

    - by user1216775
    I need some suggestions from the database design experts here. I have around six foreign keys into a single table (defect) which all point to primary key in user table. It is like: defect (.....,assigned_to,created_by,updated_by,closed_by...) If I want to get information about the defect I can make six joins. Do we have any better way to do it? Another one is I have a states table which can store one of the user-defined set of values. I have defect table and task table and I want both of these tables to share the common state table (New, In Progress etc.). So I created: task (.....,state_id,type_id,.....) defect(.....,state_id,type_id,...) state(state_id,state_name,...) importance(imp_id,imp_name,...) There are many such common attributes along with state like importance(normal, urgent etc), priority etc. And for all of them I want to use same table. I am keeping one flag in each of the tables to differentiate task and defect. What is the best solution in such a case? If somebody is using this application in health domain, they would like to assign different types, states, importances for their defect or tasks. Moreover when a user selects any project I want to display all the types,states etc under configuration parameters section.

    Read the article

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