If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Please Help, query based of selected item of combobox

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-19-04, 19:10
ccotton333 ccotton333 is offline
Registered User
 
Join Date: Nov 2004
Posts: 1
Please Help, query based of selected item of combobox

I have a windows form that contains a combobox that is used to select a item, and based on the selected item value, it populates the rest of the information. I'm new to MySQL, and I can't find any documentation to help me with this. So, If someone could help me I'd really appreciate it.

Thanks,

Chris
Reply With Quote
  #2 (permalink)  
Old 11-22-04, 02:44
Sudar Sudar is offline
Registered User
 
Join Date: Jul 2004
Location: Mars
Posts: 137
Thumbs up

Hai,

First populate the combo boz, with the set of items which the user has to select from, and then in the onChange event of your combo box, get the value of the selected item. Then use a select query on the table from which you want to get the details and use the value of the selected item in the from clause..

some thing like this...

select * from tbl_name where col_name = sel_value

then you will get the recordset, and then you can populate the other elements with the value from the recordset.

Hope this helps...
__________________
Sudar

--
My Blog
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On