select

Accessing a form variable inside javascript

Hi, I have a code like this <html> <head>Title <script> function callme() { alert("Hi"); document.test.action ="testAction.do"; alert(document.getElementById("option").value); alert('<%=request.getParameter("option")%>'); } </script> } </head> <body> <FORM method="post" name="test" > <select name=...

How to write that special select query

Hi , I have a post class : class Post { public int ID; public int? ParentID; } The only difference between answer and question in post class is that question has parend id equals null. And I want to write one query which always return question and it's answers no matter i pass to it ID of question or ID of answer for example: I h...

Wrapping BSD select() with JNA

I need to wrap a BSD-like C socket API to Java with JNA. It has basically the same functions as standard BSD socket API. Wrapping select() is problematic because of the fd_set-structure required in its arguments and the FD_* masking functions (macros) that are needed to handle fd_sets. I tried to crawl through the header files (e.g. sys...

Getting error when using post method in form

I am getting null when I am using post method while passing a form to the next page A repeat of this question link text <html> <head> Title <script> function callme() { alert("Hi"); alert(document.getElementById("prio").value); } </script> </head> <body> <FORM method="post" name="test"enctype="multipart/form-dat...

SQL Common Table Expression and an nested select

Group, I am looking for a suggestion to speed up my query. I am using a CTE to organize my data. I am pulling customer records based on account numbers, customertype and length they have been a customer. In the second part of the CTE I say COUNT(AcctNumber) AS Total and then I also want to do an additional nested select that will giv...

Will I save any time on a INDEX that SELECTs only once ?

On DBD::SQLite of SQLite3 If I am going to query a SELECT only once. Should I CREATE a INDEX first and then query the SELECT or just query the SELECT without an INDEX, which is faster ? If need to be specified, the col. to be index on is a INTEGER of undef or 1, just these 2 possibilities. ...

jQuery set the selected text

I want to have a text input that on focus selects all of the text inside, if any. This is so that I can click on the text input and just start typing rather than having to clear the current value out, assuming I wanted to overwrite what was already in the text input. How would I do this with jQuery? ...

Get result row count for individual SELECT statements with UNION ALL in MySQL when using LIMIT

Hi all. I need to get the row count for individual SELECT statements in an UNION ALL SELECT query that uses LIMIT. The MySQL docs are pretty clear about getting the global row count for the query (place individual SELECTs in parenthesis and place an SQL_CALC_FOUND_ROWS only in the first statement, then get FOUND_ROWS() the usual way). Ho...

Zend Framework Select Objects And UNION()

I'm pretty sure this is not possible in Zend Framework (I have searched the Web, the documentation and issue tracker) but I just want to make sure so I'm asking here. $select = $this->select(); $select->union($select1, $select2); That doesn't work of course. To explain what I need. I need to use UNION() to merge 2 tables in a SELECT q...

How do I wake select() on a socket close?

I am currently using select loop to manage sockets in a proxy. One of the requirements of this proxy is that if the proxy sends a message to the outside server and does not get a response in a certain time, the proxy should close that socket and try to connect to a secondary server. The closing happens in a separate thread, while the s...

How can I get the text of a selected option with ASP.NET MVC?

I have a form in an ASP.NET MVC project which has a select drop down list akin to the following: <select> <option value="ee5711b9-ec86-4378-a975-ae10a4ebedbc">Volvo Account</option> <option value="0dc0e9d8-2245-43de-81a9-5b94c19646fa">Saab Account</option> <option value="f9a05ef6-9ca6-4eeb-9e04-79726a62b38c">Mercedes Account</opti...

mysql insert select conundrum

I'm trying to insert select but I'm confused as to how to populate just 1 item into the destination table from the select, and populate the rest with static values. This is all in a stored procedure... so... here's what i'm trying to do... table:animals id |type| name 1 |cat | mittens 2 |cat | fluffy 3 |dog | rex table p...

How do i set the selected item in a drop down box (PHP MySQL Databound)

Hi Is there any way to set the selected item in a drop down box using the following 'type' code? <select selected="<?php print($row[month]); ?>"><option value="Janurary">January</option><option value="February">February</option><option value="March">March</option><option value="April">April</option></select> The database holds a month...

IE 6 Javascript replacing select dropdown issue

Hello. I have the following code - it is used to load a drop down when the user clicks on a drop down with only the loaded default option, because this drop down is quite large and IE doesn't like that very much. Here is the code: function populateDropDown(id, code) { var currentSelect = document.getElementById(id); <%--Don't ...

How to select rows except a certain one out of table with jQuery?

$("#experiences tr").gt(0).dblclick(function() { $(this).remove(); }); I used the above code to exclude the first row, but it turned out to be wrong. double click on all rows has no response now. ...

*nix select and exceptfds/errorfds semantics

The select() syscall takes 3 filedescriptor sets for watching fds for readable/writeable and "exceptions" on filedescriptor. My select man page doesn't state much about the exceptfd descriptor set. What is it used for - what kind of exceptions can and will it notify on file descriptors ? I'm assuming this can be different for the descr...

Combining two mysql Select statements so I can sort the resulting data

I was wondering if there is a way to simplify this down from two queries to a single one. I'd like to be able to sort the data as I pull it out of the database and this would allow me to do it. The tables are setup like: table: files ------------------------ fileID (INT) | domainID (INT) ------------------------ table: domains ------...

select() call not returning when chars on port

I have a select call that doesn't seem to detect characters on the serial port. Is there anything I am missing? If I remove the read() code that is in the block above the select will return for a while until the existing port buffer is emptied and then nothing more is detected. I am streaming characters to the port, and running mini...

MySQL Selecting count

I have two tables: codes_tags and popular_tags. codes_tags CREATE TABLE `codes_tags` ( `code_id` int(11) unsigned NOT NULL, `tag_id` int(11) unsigned NOT NULL, KEY `sourcecode_id` (`code_id`), KEY `tag_id` (`tag_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 popular_tags CREATE TABLE `popular_tags` ( `id` int(10) unsigned DEFAULT NU...

How to have multiple join constrains in Zend_Db_Select

Hi, How can I do a join such as : LEFT JOIN table1 t1 ON t1.foo = t2.bar AND tl.baz = t2.bat What I'm looking for is the syntax for adding a second join constraint to the leftJoin() method using Zend_Db_Select in the Zend Framework. Thanks, ...