Friends i have database by name employee-application. It has 3 tables as follows
create table departments
(
department_id int(20) not null AUTO_INCREMENT PRIMARY KEY,
department_name varchar(30) not null
);
Then,
create table designation
(
designation_id int(20) not null AUTO_INCREMENT PRIMARY KEY,
designation_name varchar(30) not null
);
Finally,
create table employee
(
employee_id int(20) AUTO_INCREMENT NOT NULL,
employee_name varchar(30) not null,
department_name varchar(30),
designation_name varchar(30),
salary int(20) not null,
FOREIGN KEY(department_name) references departments(department_id),
FOREIGN KEY(designation_name) references designations(designation_id)
);
Now i want to create form for adding new employee to the table. Here is my doubt, how do i get department_name and designation_name to my form as option/dropdown value from database??? Can someone help me to find a path to solve this..!!!
Aucun commentaire:
Enregistrer un commentaire