473,322 Members | 1,671 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,322 software developers and data experts.

populating multiple outputs from dropdown choice

111 100+
i have a MySQL table that contains a list of employees, their employee ID, and their supervisors name. On my page i have a dropdown menu populated with the supervisors name. When a person selects a supervisor, i want the next page to populate a list of all of their employees.

I originally had this set up with all of the employees names in the drop down, and the next page would populate info based on that person - and i was able to accomplish this one to one transfer, but I'm having trouble pulling back a one to many. I'm guessing i need to use a while loop, but am not sure how to accomplish this.

Can anyone help me out with this?
Jul 7 '08 #1
2 1481
pbmods
5,821 Expert 4TB
Heya, Neekos.

What's your table structure look like?
Jul 7 '08 #2
r035198x
13,262 8TB
You should therefore run a select from the database using the entered supervisor. Something like
Expand|Select|Wrap|Line Numbers
  1. select * from employees where supervisor = '$entered_SuperVisor';
and use those results to populate the next page.
Jul 8 '08 #3

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

Similar topics

2
by: Lamine Darbouche | last post by:
Can anybody help? I need to have three list boxes automatically populating each other, (ie when region is selected from the first listbox, it will populate automatically the second one which is...
13
by: melih.onvural | last post by:
Group, I'm having a tough time understanding some of the previous posts on this topic so I wanted to write what I've tried and hope that you can help me troubleshoot. I have a dropdown populated...
1
by: Andy | last post by:
What I want to do is to populate multiple dropdowns when editing. Presumably... a) I should use a DataReader so that I can get each ResultSet for each dropdown control, and that should cut down...
1
by: Mike P | last post by:
I am populating a drop down column in a datagrid on page load. Here is my code : <asp:TemplateColumn> <ItemTemplate> <asp:DropDownList ID="ddlUserName" Font-Name="Verdana" Font-Size="8pt"...
3
by: devNorway | last post by:
I have been struggling with a problem for days now, and searched for related problems and solutions but had no luck. I have two dropdown listboxes where the first is populated in page load and...
0
by: koonda | last post by:
Hi all, I have a Project due after one week. It is a web service project. I have a Web Form which communicates to the web service and this web service communicates to the database. I have all my...
2
by: Alexio | last post by:
Sample code snippet - <td align="right">Check Amount:&nbsp;</td> (1) <td><input type="text" name="CHK_input_1" size="19"style="text-align:right" onkeyup="calcCB();"...
1
by: klaul | last post by:
I've been trying to do this for a day and a half now, and am clearly getting nowhere! The database I'm using is used to keep a log of service calls to various companies. When the user inserts data,...
0
by: Kalkin | last post by:
Hi i am having trouble with the following problem any help would be appreciated:: The gridview starts off with empty text boxes for input along with already populated dropdowns to choose from for...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.