473,404 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

selecting value from a drop-down menu

Hello,
Contrary to what my screen name indicates, i'm actually quite new to SQL.
Having said that, I'll get right into my problem.
I'm trying to query an mssql database to return to the value that the user inputs through a drop-down menu in the databases GUI front-end (bugzilla actually). For example, a product is selected in a drop-down menu, and, depending on the product chosen, a second drop-down menu becomes active, containing a list of components attributed with that product. So, my query, in general looks like this:
Expand|Select|Wrap|Line Numbers
  1. SELECT product_id, component_id FROM bug_database WHERE bug_id = x;
  2.  
the problem is is that these two values are returned as integers, representing the number in the list that they were chosen from. For example, if the product the user selected was, say, Firefox, and Firefox was the third item in the product list, the product_id that this query would return is simply: 3

How, instead, do I get the query to return Firefox, the item associated with the third item in the list, instead of the number in the list?

I appreciate any help I can get.
Thanks,
_ramy
Sep 12 '07 #1
3 2149
pbmods
5,821 Expert 4TB
Heya, Ramy. Welcome to TSDN!

Please use CODE tags when posting source code:

[CODE=sql]
SQL code goes here.
[/CODE]

I'm going to go ahead and move this thread to the MS SQL forum, where our resident Experts will be better able to help you out.
Sep 12 '07 #2
Shashi Sadasivan
1,435 Expert 1GB
So is the name Firefox stored in a different table?
Sep 12 '07 #3
ck9663
2,878 Expert 2GB
something like:

Expand|Select|Wrap|Line Numbers
  1. SELECT product_id, component_id,thefieldthatholdsthebrowsername FROM bug_database WHERE bug_id = x;

then in your GUI, display the thirdfield...
Sep 13 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

19
by: Ben Gribaudo | last post by:
Hello! I am trying to query a MySQL table and retrieve either the earliest or the latest message in each thread. The messages are in a table with MsgID being the primary key and fThreadID...
2
by: thomas | last post by:
Hello all Im having problems with selecting subelements from a dynamic created RTF converted to a node-set: i have hardcodet this example: the xml structure: <xsl:variable name="test">
6
by: throat.wobbler.mangrove | last post by:
Hi, I was hoping someone may be able to help me with a tricky T-SQL problem. I need to come up with a SELECT statement that does basically the following: Select RCRD_REFNO, MAX(MODIF_DTTM)...
5
by: SGershon | last post by:
Hi! Since the first questions I asked here, I continue to drop by and read some topics here and there, I like the replies very much. I have today another question, I don't seem to find it on...
1
by: Ramesh | last post by:
hi, I am selecting fields from three table for manupulating data and i want to display total number of records selected. But i am always getting -1 value, eventhough 1000 of records are selected....
2
by: Will Newton | last post by:
I have attached some SQL which produces what to me, at least, is rather unexpected results. Selecting real columns into double precision columns loses some precision. Is this expected or documented...
48
by: phillip.s.powell | last post by:
MySQL 3.23.58 - 4.0.17 (yep, several database server instances, don't ask) I have database Spring with table Students I have database Summer with table Students I am tasked to produce a...
2
by: areef.islam | last post by:
Hi, I am kinda new to javascript and I am having this problem with selecting multiple options from a select tag. Hope someone can help me out here. here is my code...
2
by: MLH | last post by:
Lets say I have a combo box control on a form whose recordsource is a table called tbl_PotentialVINs. For argument's sake, say the table has 10 records. A user types a VIN into the control - say...
4
by: darrel | last post by:
I have a DDL list along these lines: item value="1" text="a" item value="2" text="b" item value="3" text="c" item value="2" text="d" item value="2" text="e" item value="1" text="f" item...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.