|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Database Query Question
Hi everyone.
Just registered to this great site. Ok, here goes. I have a page that has an IFrame and a 'go to' type of form element. The form element contains a list of categories. What i would like to know is, once an item is selected in this list, how do i perform a query in MySQL based on the selected item and display all the items that match this category in the IFrame? Also, how can i fill a dropdown form field dynamically with items in a database, i.e. list of categories? Thanks Emre |
|
#2
|
|||
|
|||
|
RE: Database Query Question
Well, I would loop through the resultant set you get from the database query in order to populate the dropdown list, because if you think about it logically, each item in the list should correspond to one record in your qurey resultant set.
As for doing something based on what is selected, you can name the dropdownlist and give each option a value (probably something that is related to the database, like an ID or other unique information). Check out the php.net documentation for whatever database system you want to use. I'm sure that would be a great start |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > Database Query Question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|