table

Webform Layout Question. Table or something else

Hi all, I have to create a webform that looks something like this column column - column column column column - column column label: input - label: input label: input - label: input - label: input label: input - label: input label: input label: input - label: input label: input ...

How to display animation in a JTable cell

I am looking for a way to display an animated progress indicator (animated GIF, a rotating wheel rendered through Java2D etc., no preference here) in a table cell until the value that is to be finally displayed has been computed or retrieved. So far I have just put a static "pending..." text into each cell that is not yet ready to speed...

How can I display data in table with Perl?

I am getting data from a database. It has 4 rows and 6 columns. I want to show this in an HTML table but am having problems. I've made the TH for the 6 columns. However, I am having problems in displaying the 4 rows. This is what I have so far: while (($f1, $t2, $n3, $k4, $d5, $e6) = $sth1->fetchrow_array) { push (@first, $f...

How to transform HTML table to list with JQuery?

How would I transform a table <table> <tr> <td>Name</td> <td>Price</td> </tr> <tr> <td>Name</td> <td>Price</td> </tr> </table> to a list of paragraphs with jQuery <ul> <li> <p>Name</p> <p>Price</p> </li> <li> <p>Name</p> <p>Price</p> </l...

In Oracle, is it possible to "insert" a column into a table?

When adding a column to an existing table, Oracle always puts the column at the end of the table. Is it possible to tell Oracle where it should appear in the table? If so, how? ...

Turn unordered list to a table with jQuery

Hi, i like to get an <ul><li> and make it a nice table I will style with CSS. I like the transformation to be made with jQuery * Place|Name|Earning * 1|Paul|200$ * 2|Joe|400$ * 3|James|100$ * 4|Carl|1000$ on and on.... and make a table head with the first line of the <ul> and table cell with the others... There will be maybe 4-5 <...

Set border to table tr, works in everything except IE 6 & 7

I set the border for the table event_calendar tr to be red, it works in everything except IE 6 & 7. What is wrong with my CSS? table#event_calendar tr { border:1px solid red; } <div class="content-body"> <table id="event_calendar"> <tr class="calendarHeader"> <th><div class="calendarMonthLinks"><a href="http://webdev.herki...

Wildcard character in CHECK in Create table taken as string

I created an info table that stores employee record, the SQL query for it as follows... CREATE TABLE info1 (empid VARCcHAR(8) PRIMARY KEY CONSTRAINT empchk CHECK (empid IN ('kh\%' ESCAPE '\''), initials CHAR(6), fname CHAR(25) NOT NULL, lname CHAR(25), userstatus INTEGER NOT NULL, designation CHAR(10) NOT NULL); Now, as...

Finding the Width of Tables or Cells

How do I find the width of a table or columns in a table without specifying it in HTML or Javascript? For example: <table id="myTable"> <tr><td>column a</td><td>column b</td></tr> </table> In Javascript: var tbl = document.getElementByID("myTable"); alert(tbl.style.width); //will be undefined ...

Forms - Can they be done without tables?

I've gotten used to using <table>s for aligning my form fields perfectly. This is how I commonly write my forms: <table border="0"> <tr> <td><label for="f_name">First name:</label></td> <td><input type='text' id='f_name' name='f_name' /></td> <td class='error'><?=form_error('f_name');?></td> </tr> </table> I know ...

Do 1 to 1 relations on db tables smell?

I have a table that has a bunch of fields. The fields can be broken into logical groups - like a job's project manager info. The groupings themselves aren't really entity candidates as they don't and shouldn't have their own PKs. For now, to group them, the fields have prefixes (PmFirstName for example) but I'm considering breaking the...

javascript: insert rows into table

What is the best plain javascript way of inserting X rows into a table in IE. The table html looks like this: <table><tbody id='tb'><tr><td>1</td><td>2</td></tr></tbody></table> what i need to do, is drop the old body, and insert a new one with 1000 rows. i have my 1000 rows as a javascript string variable. the problem is that table...

Swapping ms-sql tables

I want to swap to tables in the best possible manner. I have an IpToCountry table, and I create a new one on a weekly basis according to an external CSV file which I import. The fastest way I've found to make the switch was doing the following: sp_rename IpToCountry IpToCountryOld go sp_rename IpToCountryNew IpToCountry go The prob...

SQL Tables - Pattern for either/or data

Hello All, I have a quick question - is there a best practice in SQL Table design for storing "either/or" data? I have the following problem - I need to store template data (defining folder structure) in a SQL table. Any given folder might have a static name (for example "Emails") or it might be dynamically generated for each instance...

Summing values in one-line comma delimited file.

EDIT: Thanks all of you. Python solution worked lightning-fast :) I have a file that looks like this: 132,658,165,3216,8,798,651 but it's MUCH larger (~ 600 kB). There are no newlines, except one at the end of file. And now, I have to sum all values that are there. I expect the final result to be quite big, but if I'd sum it in C++,...

How do I create tables with sections and headers in ASP.NET?

I have some data that must be presented in tabular form with multiple sections. In particular, Each section of data is broken up (with it's own headers) by day. This is basically a one-off single page deal, and won't really be maintained, so I don't want to put a lot of effort into architecture. I have two tables. HEADERS and ITEMS. ...

How can a table be returned from an Oracle function without a custom type or cursor?

I am looking to return a table of results from an Oracle function. Using a cursor would be easiest, but the application I have to work this into will not accept a cursor as a return value. The alternative is to create a type (likely wrapped in a package) to go along with this function. However, it seems somewhat superfluous to create ...

mySQL query for selecting children

Hello, I am not sure if this is possible in mySQL. Here are my tables:- Categories table - id - name - parent_id (which points to Categories.id) I use the above table to map all the categories and sub-categories. Products table - id - name - category_id The category_id in the Products table points to the sub-category id in which it ...

Maximum number of workable tables in SQL Server And MySQL

I know that in SQL Server, the maximum number of "objects" in a database is a little over 2 billion. Objects contains tables, views, stored procedures, indexes, among other things . I'm not at all worried about going beyond 2 billion objects. However, what I would like to know, is, does SQL Server suffer a performance hit from having a...

Count number of table rows between two specific rows with jQuery

<table> <tr id="parent_1"> <td>Parent 1</td> </tr> <tr class="child"> <td>Child 1</td> </tr> <tr class="child"> <td>Child 2</td> </tr> ... <tr id="parent_2"> <td>Parent2</td> </tr> ... </table> How can I find the number of child rows between parent_1 and parent_2 using jQuery? Edit: Sorry, didn't ma...