ErSKS / KhCE

Khwopa College of Engineering
5 stars 0 forks source link

Update Priority #82

Closed ErSKS closed 7 years ago

ErSKS commented 7 years ago

Update Priority of Applicants

ErSKS commented 7 years ago

SELECT * FROMstudentWHEREdept_id_p1= 1 ANDdept_id_p3= 1;

SELECT id, entrance_rank, district_id, quota 
FROM `student` WHERE `dept_id_p1` = 1 AND `dept_id_p3` = 1;
ErSKS commented 7 years ago

Solution p1:1 & p3:1

SELECT id, entrance_rank, district_id, quota, amount_paid, dept_id_p1,dept_id_p2,dept_id_p3 
FROM `student` WHERE `dept_id_p1` = 1 AND `dept_id_p3` = 1 AND verified=1 AND apply=1;
ErSKS commented 7 years ago
SELECT id, entrance_rank, district_id, quota, amount_paid, dept_id_p1,dept_id_p2,dept_id_p3 
FROM `student` WHERE `dept_id_p1` = 1 AND `dept_id_p3` = 1 AND verified=1 AND apply=1 AND district_id !=26;
ErSKS commented 7 years ago

New Solution

SELECT id, entrance_rank, district_id, quota, amount_paid, dept_id_p1,dept_id_p2,dept_id_p3 FROM `student` WHERE apply=1 AND verified = 1 AND amount_paid=250 AND dept_id_p1=1 AND dept_id_p3=1
ErSKS commented 7 years ago

31 Applicant's 2nd & 3rd Priorities Cancelled !

Reason: Paid only NRs. 200

SELECT * FROM student WHERE dept_id_p1=1 AND dept_id_p2=1 AND dept_id_p3=1 AND login=5 AND apply=1 AND verified=1 AND amount_paid = 200

UPDATE student SET dept_id_p2=99, dept_id_p3=99 WHERE dept_id_p1=1 AND dept_id_p2=1 AND dept_id_p3=1 AND login=5 AND apply=1 AND verified=1 AND amount_paid = 200

31 rows affected. (Query took 0.0146 seconds.)

ErSKS commented 7 years ago

116 Applicant's 3rd Priorities Cancelled !

Reason: Paid only NRs. 250

SELECT * FROM student WHERE dept_id_p3!=99 AND login=5 AND apply=1 AND verified=1 AND amount_paid = 250

UPDATE student SET dept_id_p3=99 WHERE dept_id_p3!=99 AND login=5 AND apply=1 AND verified=1 AND amount_paid = 250

116 rows affected. (Query took 0.0166 seconds.)

ErSKS commented 7 years ago

81 Applicant's 3rd Priority Cancelled !

Reason: Paid only NRs. 200

SELECT * FROM student WHERE dept_id_p1=1 AND dept_id_p3=1 AND login=5 AND apply=1 AND verified=1 AND amount_paid = 200

UPDATE student SET dept_id_p3=99 WHERE dept_id_p1=1 AND dept_id_p3=1 AND login=5 AND apply=1 AND verified=1 AND amount_paid = 200

81 rows affected. (Query took 0.0143 seconds.)