moonjazz Posted October 31, 2011 Share Posted October 31, 2011 is it possible to do that? example : IF $ClassSize=$HeadCount THEN UPDATE course SET Status = 'close'; Link to comment https://forums.phpfreaks.com/topic/250151-if-xy-then-update-mysql/ Share on other sites More sharing options...
trq Posted October 31, 2011 Share Posted October 31, 2011 Yes. Link to comment https://forums.phpfreaks.com/topic/250151-if-xy-then-update-mysql/#findComment-1283607 Share on other sites More sharing options...
moonjazz Posted October 31, 2011 Author Share Posted October 31, 2011 i realized UPDATE course p INNER JOIN courseschedule pp ON p.CourseID = pp.CourseID SET p.Status = 'Closed' WHERE pp.HeadCount = p.ClassSize does the same thing. Link to comment https://forums.phpfreaks.com/topic/250151-if-xy-then-update-mysql/#findComment-1283619 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.