select

Pivot a one row column T-SQL

I have a one row table returned from a query that looks something like this [Date1] [Date2] [Date3] [Date4] [Date5] [Date6] and I want all the Dates to stack up like this [Date1] [Date2] [Date3] [Date4] [Date5] [Date6] How would I go about doing this without a bunch of separate queries and union statements? I have tried playing a...

HTML select element onchange trigger for already selected option

I have the following HTML containing a drop down list (single selection) <script type="text/javascript"> $(document).ready(function () { $("#garden").bind('change', function() { alert("Changed"); }); }); </script> <body> <div id="...

div with scrollbar over select in IE6

Hi, please could you advise? I need to put a div over a select element in IE6. The approach I've chosen is to use iframes in div (jquery bgiframe plugin). Everything is nice except one: this div has a vertical scrollbar, and just this scrollbar is under the select although iframe is under the whole div (including its scrollbar). How cou...

SQL : The influence of research speed with empty clolumns?

Hi, I'd like to know if some empty columns (with the field 'null' for example) can decrease the speed to make a query "SELECT" on a indexed column or a normal column. Thanks, Ba ...

select name of a person with at most grandchildren

Hi I have a simple table with persons, but there is a additional field witch holds information (person id) who is a father/mother of that person, so the 2 dimensional table can hold a familly tree the table is id first_name last_name salary spouse_id father_id mother_id sex 100 Steven King 26400 101 (null) (null) m 101 Neena Koc...

How do I clear all options in a dropdown box?

I'm stumped. My code works in IE but breaks in Safari, Firefox, and Opera. (big surprise) document.getElementById("DropList").options.length=0; After searching, I've learned that it's the "length=0" that it doesn't like. I've tried "...options=null" and "var clear=0; ...length=clear" with the same result. I am doing this to multiple ...

jQuery AJAX not Working to Update City By Province

As the title may suggest, I have been using jQuery AJAX to try and pull a list of Cities from a database when a Province is selected. I am using the following code: $('#province').change(function() { var province = $(this).val(); /*$.get("<?php echo site_url('cottage/cities'); ?>?province="+province, function(data) { ...

select() blocking forever even if timeval is 0 on non-blocking TCP sockets ?

After we do a send(), the error that comes back is EWOULDBLOCK, so then we do a select() with a timeval structure with tv_sec = tv_usec = 0 which should return back immediately, but it doesn't, we are stuck in the select() call, and people have said that have waited over 2 mins, with it still being blocked in the select() call. This is...

jquery get select options to array

Hi everyone, I'm kind of stuck with one - presumably simple to resolve problem. I want to create the code which will be used for all select elements on the site. Depending on the "label" attribute assigned to the "option" I want to hide all other "div" elements which have classes the same as other "label" values of the "options" in th...

Creating multiple instances of autopopulated select boxes

So here is the deal, I have a form that appears in a table. Each row has a certain amount of information, one of the form elements in a "select" dropdown box. This "select" contains various categories as optgroups and the information under those categories are the options. This is quickly becoming unmanageable as the list gets longer ...

Need an input field not select PHP HELP

Hello All, Just hoping someone can help me out I've spent hours trying to figure this one out... I need to edit the following PHP so I can have the user enter an amount rather then having to select from a drop down list. <? include("includes.php"); session_start(); /**************************************************************...

jquery find by index in a list

<ul> <li>No</li> <li>Yes</li> <li>No</li> </ul> //demostration purpose $('ul').get(2).text(); //output = Yes What's the best way to access a specific item in a list? and use it as a selector? ...

SQL SELECT: match a PK to a tuple and from value of that tuple select others that have same value to that tuple?

hi guys, I'm stuck with a homework.. How can I from this table check what cID, sID = '03' are taking? And with that, checking other sID that got the same cID as sID = '03' and select it out? sID cID year grades -------------------------------- 01 L21D 1997 4 01 L24D 1998 2 01 L32D 1998 3 02 L21D 19...

Socket programming in C, using the Select() function.

Based from the answers I got from: http://stackoverflow.com/questions/3366808/multiple-sockets-for-clients-to-connect-to I've create this: //Server sock_init(); //from SFL, see http://legacy.imatix.com/html/sfl/ timeout = 50000; serv_sock_input[0] = TCP(1234); serv_sock_input[1] = UDP(9876); input_protocol...

SQL SELECT: value that occur > 1

I'm trying to select duplicates from this table: snr zip 01 83 02 82 03 43 04 28 Expected result is just empty table. Cuz it got no duplicates. I've tried with this query: SELECT snr, zip FROM student GRUOP BY snr HAVING (COUNT(zip) > 1) But it says that syntax is error, and that I'm trying to query an aggregate functions, etc.. ...

How Can I SELECT Similar Rows in Two Different Tables in MySQL (Is It Possible?)

I've got two tables and I'd like to grab all of the schools where there is a similarly spelled school or the same school. For example: my_table_a: School             Olde School         New School     Other, C.S. School   Main School Too Cool for School my_table_b: School Old School New ES     Other School Main School  Hardkn...

Please suggest a good solution

In my project, I want to implement code where I need to keep two list box(asp control), and I want to implement add remove like functionality between these two list box that is removing one item from list box should be added to another and removing from another should be added to first. How can I use JavaScript to achieve this effect? A...

Mysql Query group by

Hi, I am trying to make a query to get some results: I have a table with sote data: client | price 1 | 100 1 | 150 1 | 200 2 | 90 2 | 130 2 | 200 3 | 95 3 | 120 3 | 250 I would like with one query to select the results and order it by price and client and get them in this form, ordered by the best price of each clint: 2 | 9...

List view row Selection

hi i have a simple list view control my queries are: 1) how to set first row selected on start (after fill data in list view) 2) when i navigate by hardware button i got AdapterView.OnItemSelectedListener and color of row background change, but when i click i not get any OnItemSelectedListener and no row selected. How to select row on...

MySQL SELECT efficiency

I am using PHP to interact with a MySQL database, and I was wondering if querying MySQL with a "SELECT * FROM..." is more or less efficient than a "SELECT id FROM...". ...