zishan0215 / attendance

Attendance Management System for Computer Departement, JMI
Other
40 stars 128 forks source link

Admin->Teachers: Remove subject #27

Closed zishan0215 closed 9 years ago

zishan0215 commented 10 years ago

So lets discuss this here

wadhwasahil commented 10 years ago

hi

zishan0215 commented 10 years ago

haan to remove button ko code kar ke liye you need to know the fact that teacher_id cannot be empty

wadhwasahil commented 10 years ago

ok

zishan0215 commented 10 years ago

its a simple process.. just update the subjects table and put teacher_id = 0

wadhwasahil commented 10 years ago

ek min mujhe kuch cheezen poochni hain

wadhwasahil commented 10 years ago

why increment option on edit student

zishan0215 commented 10 years ago

har semester over hone ke baad semester increment ho jaata hai students ka

wadhwasahil commented 10 years ago

usse code kaise kiya ??

wadhwasahil commented 10 years ago

main to main cheez daali thi

wadhwasahil commented 10 years ago

submit krne ke baad ussi page par khul jata hai isse code kaise kiya?

zishan0215 commented 10 years ago

dekhlo code main... subject_m main hai

wadhwasahil commented 10 years ago

  

zishan0215 commented 10 years ago

just a query to increment the semester

wadhwasahil commented 10 years ago

   yeh kya krta hai

zishan0215 commented 10 years ago

har student ka semester increment kar deta hai by 1

wadhwasahil commented 10 years ago

if($this->student_m->save($array,$this->data['student_id'])) { $this->data['confirmation'] = 1; } else { $this->data['confirmation'] = 2; }

wadhwasahil commented 10 years ago

yeh kya kr rha hai??

zishan0215 commented 10 years ago

ye confirmation set kar raha hai.. agar update sahi hua to cofirmation positive hogi else negative

wadhwasahil commented 10 years ago

student_m mein sirf update name kiya hai semester kyu nhi kiya??

tusharaheja commented 10 years ago

are you alright sahil? you have the new code so you can see yourself ki use code kaise kiya gaya..!!!

zishan0215 commented 10 years ago
public function update_semester() {
    $query = 'UPDATE student set semester = semester + 1';
    $q =$this->db->query($query);
    return $q;
}
zishan0215 commented 10 years ago

ye hai query

nickedes commented 10 years ago

sahil for increment semester i just incremented the values of semester column in student table!

nickedes commented 10 years ago

use update query.

wadhwasahil commented 10 years ago

acha to ab yeh batao @zishanAhmad ki remove button mein kya kya options dene hain ?

zishan0215 commented 10 years ago

kuch nahi

zishan0215 commented 10 years ago

just remove the subject..(that is put teacher_id) = 0

wadhwasahil commented 10 years ago

why 0?

zishan0215 commented 10 years ago

becuase that is what it has to be to unlink from the current teacher

wadhwasahil commented 10 years ago

isme remove button ke corresponding subject_id hoga na

wadhwasahil commented 10 years ago

tumne teacher_id hidden krke kyu dala hai

zishan0215 commented 10 years ago

nahi.. you only need subject_code to update the teacher_id = 0

wadhwasahil commented 10 years ago

haan to subject code save kahan hua hai uss page pr

zishan0215 commented 10 years ago

karlo tum.. remove waale button ka form jo hai.. usme hidden input le lo subject_code ka

wadhwasahil commented 10 years ago

tumne usme hidden mein teacher_id liya hai?? iska kya use hai?

zishan0215 commented 10 years ago

that should be subject_code.. change karlo

wadhwasahil commented 10 years ago

remove krne ki coding kidhar hogi??

zishan0215 commented 10 years ago

wahi pe.. view_teacher main

wadhwasahil commented 10 years ago

usme SQL commands chal jayenge?/

zishan0215 commented 10 years ago

commands to likhi hui hain subject_m main

wadhwasahil commented 10 years ago

arre matlab query kahan bnaun ??

wadhwasahil commented 10 years ago

controller mein??

zishan0215 commented 10 years ago

just use save

zishan0215 commented 10 years ago

no need to write your own query

wadhwasahil commented 10 years ago

where to use save()?

zishan0215 commented 10 years ago

view_teacher main

zishan0215 commented 10 years ago

for eg.. refer to increment semester ...

wadhwasahil commented 10 years ago

arre bhai mere jo tum save() wali query hai vo to controlloer mein likhoge na

zishan0215 commented 10 years ago

bhai.. save defined hai my_model main

zishan0215 commented 10 years ago

itni jagah use kara hua hai.. search karo for save and see how it is being used