Respected gurus,
I want to develop corporate recruitment system and create 7 table i.e user_registration,dept.,sub_dept,multiple_question,desc_question_ans,mul_ans.
My objective,
1. Dispyaed questions are dynamically but select from static question
2. store the user input.
3. sending email and sms to the user.
The tables are
1.User_registration(a_id , A_name, F_name,DOB, gender,Tadd,Padd,Tel_no, Cellno, emailid,Aemailid,Tech, Qualification, Exp,reference,D_id, Exam_date,Result_mul,Result_desc,No_of_text,Qualify);
2.Org_user_master(u_id,login,pass,E_id,E_name,u_date,User_type,Branch);
3.Master_dept(D_id ,D_name);
4.Subdept(Sd_id ,Sd_name ,D_id);
5. Mul_question(Q_id , D_id , Q_text , Sd_id);
6.Mul_opption(U_id,Q_id , opption,Answer, Q_seq_no);
7.Desc_question_answer(Dq_id,D_id,Sd_id,Q_text, A_path, Status)
please guide me to how to solve this and what wrong with me.
and you want to do this with an SMF forum or an extension on it ?
Basically you are looking for a database design , whatever limited information you gave, I can see that you can have following : (taking in account your major need ie question / answer part)
1. A user info table : To record user specific details / Registration details
2. A question / Answer table , where you will store your questions with answer to them.
3. A user input table where you will store answers given by user. There can be various way, however simplest is to
--------------------------------------------
User ID | Question ID | Answer
--------------------------------------------
4 | 29 | 2
--------------------------------------------
So, you can store, User with ID 4 gave answer 2 for question number 29 .
Assuming your questions are multiple choice questions.
I hope that helps, don't consider it final layout, as it can drastically change as per your actual need.
I prepare the table
1.User_registration(a_id , A_name, F_name,DOB, gender,Tadd,Padd,Tel_no, Cellno, emailid,Aemailid,Tech, Qualification, Exp,reference,D_id, Exam_date,Result_mul,Result_desc,No_of_text,Qualify);
2.Org_user_master(u_id,login,pass,E_id,E_name,u_date,User_type,Branch);
3.Master_dept(D_id ,D_name);
4.Subdept(Sd_id ,Sd_name ,D_id);
5. Mul_question(Q_id , D_id , Q_text , Sd_id);
6.Mul_opption(U_id,Q_id , opption,Answer, Q_seq_no);
7.Desc_question_answer(Dq_id,D_id,Sd_id,Q_text, A_path, Status)
i want to question are displayed in dynamically select from the static question.
You can actually select random question easily from your db and show it .. easiest way is :
SELECT * FROM `table` ORDER BY RAND() LIMIT 1;
However, if your db is small, its fine, but if its not small then above query is problem : then you can actually find rand using mt_rand() in php then fetch that ID from db.
eg would be :
Quote$range = mysql_query( " SELECT MAX(`id`) AS max_id , MIN(`id`) AS min_id FROM `table` ");
$range_row = mysql_fetch_object( $range);
$random_id = mt_rand( $range_row->min_id , $range_row->max_id );
$result = mysql_query( " SELECT * FROM `table` WHERE `id` >= $random_id LIMIT 0,1 ");
However, it can be further tweaked.. its not the tested code but should give you idea.
Thank u sir .
please check my table.what we can add this table for more valueable .