select

SQL Server 2005 and SELECT and UPDATE locked

I want to perform a update then select the result. I don't want anything to be able to update the row I am updating until after the select has occurred. How would I do this? My goal is to increment a value of a row and return that incremented value. I have thus far found that I end up with an issue where update (to increment) followed b...

Changing options in select box based on different select options

I have 2 select options. I want to change the drop down options in second select options based on what I select in first select options. How do I do that in jquery? <select id="Manage"> <option value="a">A</option> <option value="b">B</option> <option value="c">C</option> <select> Second select option if A is selected from f...

select query related problem

i have interest rate and amount in a table where interest rate are ranged in different values like 4.5,4.6,5.2,5.6 etc. i want to get sum of amounts classified by interest rate where interest rate will be separated by .25. for example all amount having interest rate 1.25,1.3,1.4 will be in one group and 1.5,1.67,1.9 will be in another ...

Socket programming in perl, problem with perlio layer?

I'm noticing some problems with the perlio layer in perl. Took me a good day to track it down and was hoping some other people knew something about this? The scariest thing about this is that since its so low-level, I'm worried it'll reduce the code's portability. Server code: use strict; use Socket; socket(my $sock, AF_INET, SOCK_S...

select row from table and substitute a field with one from another column if it exists

I'm trying construct a PostgreSQL query that does the following but so far my efforts have been in vain. Problem: There are two tables: A and B. I'd like to select all columns from table A (having columns: id, name, description) and substitute the "A.name" column with the value of the column "B.title" from table B (having columns: id, t...

Styling select and options in html (IE 6)

I want to stlye a select element. i.e to constrain its width to a specified value,background-color. I also want to be able to style the option set(via Option constructor) Is it possible. I am using IE6. ...

using the selected value of a drop down before form submission

Hi, i am using a dropdown in php which asks for user_category before creating the user. Upon selection of the category further text boxes are to be created dynamically depending upon the selection. I know how to get the selected value from $_POST but here i need it befor form submission.Pls help ...

how to using jquery get select element has MULTIPLE mode and reverse

Hi everyone! I have a stack with my work today. My stack here: I have a select html element and it has MULTIPLE mode: <select class="test" MULTIPLE></select> (MULTIPLE mode also type as : multiple="multiple" i inclue here) <select class="test" multiple='multiple'></select> now i only want select this element in many normal select ...

T-SQL How To: Compare and List Duplicate Entries in a Table

SQL Server 2000. Single table has a list of users that includes a unique user ID and a non-unique user name. I want to search the table and list out any users that share the same non-unique user name. For example, my table looks like this: ID User Name Name == ========= ==== 0 parker Peter Parker 1 parker Mary...

how to reuse subquery result in mysql

I'm doing a statistic job like this: SUM |COND1 |COND2 |... -------------------------- 100 |80 | 70 |... The SUM result is calculated from multiple tables, and the CONDs are subset of that. I wrote a sql like this: select tmp1.id,sum,cond1,cond2 from ( select id, count(*) as sum from table1 group by table1.id) tmp...

jQuery Hide/Show with select element

I need to show and hide with the select element some divs. So far I have the HTML and I've tried many jQuery snippets online but none seemed to work. I need help please. HTML <div class="adwizard"> <select id="selectdrop" name="selectdrop" class="adwizard-bullet"> <option value="">AdWizard</option> ...

First time using select(), maybe a basic question?

Hello people, i've been working for a few days with this server using select(). What it does, is that, i have two arrays of clients (one is "suppliers", and the other is "consumers"), and the mission of the server is to check whether the suppliers have something to send to the consumers, and in case affirmative, send it. The second par...

change default selected country and province in Magento

I need to have either the only country viewed or the default country to be Canada and more specifically british columbia when choosing an address in magneto. What would be needed to make this change? ...

CSS - changing the font color for a from select option in firefox

I'm building a website for my church, and I'm teaching myself all about web design along the way. http://www.wilmingtonchurchofgod.org/contact_us.html is the link where you can see my issue. If you look at that page in firefox, and you click the select part of the form (next to, "Who would you like to contact?") you will see that when ...

How to select first entry of the day grouped by user in SQL

I've looked around and can't quite grasp the whole answer to this SQL query question needed to extract data from an MS Access 2000 table. Here's an example of what the table [Time Sub] looks like: **CLIENT_ID, DATE_ENTERED, CODE, MINUTES** 11111, 5/12/2008 3:50:52 PM, M, 38 11111, 5/12/2008 2:55:50 PM, M, 2 11714, 5/13/2008 1:15:...

MySQL select: maximum 3 photos from the same album

Hello there! I have table with next structure: `id` (int), `album_id` (int), `photo_id` (int), `date_added` (int) The task is next: I must select 100 photos from this table, ordered by date_added and intricacy in that I could select maximum 3 picture from the same album. That is I could select one, two or three photos from one album ...

SQL Server: query database user roles for all databases in server

I would like to make a query for database user roles for all databases in my sql server instance. I modified a query from sp_helpuser: select u.name ,case when (r.principal_id is null) then 'public' else r.name end ,l.default_database_name ,u.default_schema_name ,u.principal_id from sys.database_principa...

MySQL PHP | "SELECT FROM table" using "alphanumeric"-UUID. Speed vs. Indexed Integer / Indexed Char

At the moment, I select rows from 'table01 and table02' using: SELECT t1.*,t2.* FROM table01 AS t1 INNER JOIN table02 AS t2 ON (t1.ID = t2.t1ID) WHERE t1.UUID = 'whatever'; The UUID column is a unique index, type: char(15), with alphanumeric input. I know this isn't the fastest way to select data from the database, but the UUID is ...

Problem with multiple select removing more than 1 option

Ok, there seems to be a problem with the JS Code for Opera browsers, as it only removes the last option tag that is selected within a multiple select tag, can someone please help me. Here is the HTML for this: <select id="actions_list" name="layouts" multiple style="height: 128px; width: 300px;"> <option value="forum">forum</option...

Javascript, html: How to tell if option box is has been set?

Hi There, I am having trouble finding out how to figure out if a a html dropdown box has been set? Ok, I understand how I acn check the index once it has been activate and an item chosen. But, how do I determine that the box ahsn't been touched and no item selected? Thanks. ...