select

Change TextField selection color in AS3

How can I change the select ("highlight") color of an TextField in actionscript 3? I've got an input textfield with white text on a black backdrop and as a result, selections are invisible, which is horrible for usability. Thanks! ...

How can I SELECT multiple columns within a CASE WHEN on SQL Server?

I have searched this site extensively but cannot find a solution. Here is the example of my query: SELECT ActivityID, Hours = (CASE WHEN ActivityTypeID <> 2 THEN FieldName = (Some Aggregate Sub Query), FieldName2 = (Some other aggregate sub query) WHEN A...

When to add index on joined tables

I have a mysql table with 9 million records that doesn't have any indices set. I need to join this to another table based on a common ID. I'm going to add an index to this ID, but I also have other fields in the select and where clause. Should I add an index to all of the fields in the where clause? What about the fields in the s...

PHP and Multiple DB Selects

I've got two tables from which I need to extract information, but the data from the second table depends on the information I get from the first one. Is there an easy way to handle this? <?php mysql_connect('localhost', 'root', 'root') or die(mysql_error()); mysql_select_db('stadium') or die(mysql_error()); $result = mysql_query(...

Simple way to select chosen option in <select> from the value given by $_POST?

How can i add the selected="selected" bit to the option in an HTML <select> input from the sent $_POST data without an if statement within each option? ...

Codeigniter: Better way to select db?

This is my function to get stuff from a SQL db... Is there a more elegant way to do this? function getResults_1($id) { $this->db->select(array("a_1","a_2"))->from('Survey'); $this->db->where('user_id', $id); return $this->db->get(); } function getResults_2($id) { $this->db->select(array("a_6","a_8","a_13","a_14"))->fro...

Insert/Select with Linq-To-SQL

Is there a way to do an insert/select with Linq that translates to this sql: INSERT INTO TableA (...) SELECT ... FROM TableB WHERE ... ...

jQuery Combobox/select autocomplete?

Does a jQuery plug-in exist for replacing select/combo box? I tried SexyCombo, and it is as close to what I want, but it doesn't complete if you are writing from middle, only from beginning. I have 2 levels of categories (20 top level categories, and with subcategories in total 120 categories), so when user is submitting an entry, he m...

Ruby Select method (for an array) problemos

I'm running the following method and I'm successfully passing two arguments (inventory, quantity) into the method. However I'm incorrectly using .first and .each methods. I'm attempting to replace .each with the .select to select for the cart item with the Inventory id: 6 possible .each replacement: (does not function) inventory_to_incr...

SELECT INTO the same table

I have a requirement where I want to rename a column. In in this case, it should happen like: 1.) I need to create a new column with the existing column structure. 2.) Migrate the data to the new column. 3.) Retain the old column. I don't have the new column structure and I have to take it from the old column. TIA. ...

Re-reading from a named pipe when writers come and go.

I've got a problem where I have to read from a named pipe. I have to handle the situation where writers to the named pipe come and go but I need to keep the same pipe open throughout my applications. I have summarised this in the following code. int main( int c, char *v[] ) { int rfd; if ( (rfd = open( PIPENAME, O_RDONLY | O_NO...

HTML Select-Multiple Input Field = How to select/deselect (=toggle) a value with JQuery?

Hallo Experts, I have a standard "select multiple" HTML Input field als below: <select multiple="multiple" size="5" id="mysel" name="countries"> <option value="2">Afghanistan</option> <option value="4">Aland</option> </select> As this is a "multiselect", to select more than one value you have to hold the CTRL Key and selct any f...

SQL query from flat file

I have a table such as: John email1 email2 email3 ...and so on I need to transform the dataset to this format: John email1 John email2 John email3 it could be exported out to Excel and the imported back in if that would be easier. Thanks... ...

Multiple Select type for Jeditable - In Place Editor plugin

Hi everyone, I use jeditable in my project where I dynamically update lots of different types of content: text, textarea and select. I would need a new type to meet one of my needs : a multi-select type that could be called "selectmulti". When editing the field typed "selectmulti", a select list appears and would allow users to select...

How do I order by multiple columns in a SELECT query?

I have a table of records like below int_record_id int_category_id str_name int_order bit_active 1 1 test1 2 1 2 1 test2 1 1 3 2 test3 1 1 1 3 te...

Howto get the Value of an Selected Object in Javascript

How Can i get the value of an Selected object like select Id="foo" there are many options how can i get the value of the current selected? ...

Oracle equivalent to SQL Server STUFF function?

Hi, Does Oracle have its own implementation of SQL Server stuff function? Stuff allows you to receive one value from a multi row select. Consider my situation below ID HOUSE_REF PERSON 1 A Dave 2 A John 3 B Bob I would like to write a select statement, but I want the PERSON names to be ...

SQL (mySQL) update some value in all records processed by a select

I am using mySQL from their C API, but that shouldn't be relevant. My code must process records from a table that match some criteria, and then update the said records to flag them as processed. The lines in the table are modified/inserted/deleted by another process I don't control. I am afraid in the following, the UPDATE might flag som...

Dojo: dijit.form.select won't fire "onClick" event the first time clicked

Hi, I've been through the Dojo docs as well as the API and tried Google but can't find a solution to my problem, I hope anybody here can help me out. I'm trying to create a dijit.form.select programmatically (using Dojo 1.4) and connect to the "onClick"-event of the widget. Here's a part of my code: var dataSelect = new dijit.form.Sel...

SQL join: selecting the last records in a one-to-many relationship

Suppose I have a table of customers and a table of purchases. Each purchase belongs to one customer. I want to get a list of all customers along with their last purchase in one SELECT statement. What is the best practice? Any advice on building indexes? Please use these table/column names in your answer: customer: id, name purchase: i...