select

Mysql SELECT nested query, very complicated?

Okay, first following are my tables: Table house: id | items_id | 1 | 1,5,10,20 | Table items: id | room_name | refer 1 | kitchen | 3 5 | room1 | 10 Table kitchen: id | detail_name | refer 3 | spoon | 4 5 | fork | 10 Table spoon: id | name | color | price | quantity_available | 4 | spoon_a | white | 50 | 100...

SQL Server 2000 "Select is broken" with TOP clause

Using SQL Server 2000 Developer Edition, why would this code: select top 10 * from table result in this error: Server: Msg 170, Level 15, State 1, Line 1 Line 1: Incorrect syntax near '10'. and this code: select * from master m left join locality l on m.localityid = l.localityid result in this error: Server: Msg 170, Le...

Can I select distinct/group by characters in a field in SQL?

I'd like to run a query which for a given field will count the instances of a particular character. For example if I had a table called 'Friends' with a 'Names' field containing rows: Edward, James, Mike. I'd get the output: A 2, D 2, E 3, I 1, and so on... ...

How to select recently appeded element in jquery?

I want to select recently created element doing something like this: $("body").append("<div id='popup.dialog'></div>"); dialogDiv = $("#popup.dialog"); But after execution of this dialogDiv contains nothing. So is there're way to select newly createn element? ...

SQL comparing set of information in a column

Hey all, I'm having a difficult time wording this properly which is why im having trouble finding an answer online, so the best I can do is give an example. I have the following database table: ACTORNAME SERIESNAME ------------------------------ ------------ baldwin found baldwin ...

jQuery traversing form elements

I'm trying to hide a form label and textbox, by default, and make them appear when an option is selected. I can't see why my code keeps failing. <tr> <td><label>My Label</label></td> <td> <select name="1" id="1"> <option value="2" selected="selected">2</option> <option value="3">3</option> <option ...

Setting the height of a SELECT in FIREFOX 2

Hi, I have a weird problem with HTML select box height in Firefox 2, here's the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>FIREFOX 2 SELECT BOX HEIGHT ISSUE</titl...

UITableViewCells not highlighting on touch

I'm subclassing UITableViewCell and adding two subviews (image, UILabel). When the row is touched. There's no cell highlighting indicating the cell was selected. I'm pretty sure I missed something, not sure how to handle highlighting for subclassed cell. Any help would be appreciated. Thanks. ...

Find and disable fields of a certain name or ID using jQuery

I have a number of input fields that I would like to enable or disable based on the state of a checkbox. Specifically, any fields with IDs beginning with "ship1" I would like to find and disable them when the box is checked. Anyone know how? Here's a snippet of my page: <div id="tabs-1"> <fieldset> <legend>Ship...

Exclude specific columns in select query in MYSQL

I want to select 15 columns from a table of 20 columns. Is there a way to exclude those 5 columns instead of specifying other 15 columns. ...

Dropdownlist select

I have a dropdown list that searched a column in database table and returns items to listbox in DDL's selectchange event. In this same event I want to include code that will populate teh listbox with items that where in it before search if user deselect , i. e. if ProjDDL.selecteditem.value = "--". Please help me with the code. protect...

Showing /hiding elements of a form based on menu selection

I am trying to program (while learning JQuery) the following: I have a form with various elements in it. Based on a selection made with a select menu item, I want one or more elements to either be hidden or shown. I have this so far as a script: // JavaScript Document var joinApp = { ready : function() { var selApp = 'instit...

Fill a select/menu object using jQuery

Hi guys I need to fill a object using jQuery I have a dialog (jQueryUI) that shows. Once dialog closes, the object should be filled with items taken from a mySQL table I have a function fill_select() located in my JS code... and I should place code there, because I call this JS function frequently. PS: I should remove all the item...

Struts 2 select tag filled by list property

Hi, I am new to struts 2. I am facing problem in filling Select tag with list property. The values are supplied from action class.Please provide me sample sode for this scenario. My action class public class TripDetailsAdd extends ActionSupport { @Override public String execute() throws Exception { return SUCCESS; } ...

How do I select min/max dates from table 2 based on date in table 1?

I have a monthly table (only holds rows with first day of month, and unique constraint so only one of each) and a daily table with similar information for each day (same deal, only one per day): Monthly table Daily table ------------- ----------- 2009-01-01 2009-01-01 2009-02-01 2009-01-02 : : ...

JavaScript: Remove current mouse highlight from the page?

Let's say I highlight some text on the page using my mouse. How can I remove all highlighted text using JavaScript? Thank you. ...

Capture mouse events for HTML option element on IE

For Internet Explorer only it seems that the target (srcElement) of clicks,mousedowns,mouseups,mouseovers,etc on <select /> elements will not be tied to the <option /> element. Given the following HTML: <select id="madness"> <option value="1">One</option> <option value="2">Two</option> <option value="2">Three</option> </sele...

Grails Form Select Options

The "select" form component in grails can have the form: <g:select name="user.age" from="${0..59}" value="${age}" noSelection="['':'-All-']"/> But if I need to add other options aside from the numbers, how would I do that (example options are: 0..59, All, "/5", "/10", etc,...) Thanks ...

Sliding & hiding multiple panels in jQuery.

I have a table with multiple rows in each row is a select list and based on the selection (when the onchange event is fired) panels appear containing additional data below the row.I currently have code like this: var allPnls = '.inv-dtl-comnts-add,.inv-dtl-comnts-update'; $(document).ready(function(){ hideAll(); //select a...

LINQ to XML Question: Returning Nodes with a particular select

Hi, I have this XML: <?xml version="1.0" encoding="utf-8"?> <ConfiguraCanale ID_Comando="1"> <canaleDigitalOUTPUT ID_Canale="1" > <stato>0</stato> </canaleDigitalOUTPUT> </ConfiguraCanale> <ConfiguraCanale ID_Comando="2"> <canaleAnalogicoINPUT ID_Canale="2"> <timeAttesaPreCamp>00:03:00</timeAttesaPreCamp...