In the example
1) one scholar has many student entries
2) each student entry has session_id field (out of them only one session is current at a time) and class_id field
3) When updating class of particular scholar joined with student with current session(out of so many student entries for that scholar) since condition is omitted it updates class_id of all students of that scholar while it should update only student with perticular session_id (Which one is marked as current in session table)
the update query is just like
UPDATE student SET class_id=17 where scholar_id=15 (checked via update)
while it should be
UPDATE scholar join student .. SET student.class_id=17 WHERE
scholar.id=15 and student.session_id=8
like it is working for select.
--
Regards
Gowrav Vishwakarma
Man of Affairs, Digital Vish, Xavoc International
http://www.digitlavish.com :
+91 9783807100
http://www.xavoc.com--------------------------------------------------------------------
Never Never Never Never Never Never Never Never Never Never Never Never Never Never Never GIVE UP