Member
Member
midas   2010-10-21, 01:15
#1

from zenpage news class

42 function remove() {
43 if ($success = parent::remove()) {
44 $success = query("DELETE FROM " . prefix('obj_to_tag') . "WHERE type='news' AND objectid=" . $this->getID());
45 $success = $success && query("DELETE FROM ".prefix('news2cat')." WHERE news_id = ".$this->getID()); // delete the category association
46 }
47 return $success;
48 }

but where is delete from news?
$success = $success && query("DELETE FROM ".prefix('news')." WHERE id = ".$this->getID()); // remove the article

Member
Member
midas   2010-10-21, 02:16
#2

ok i found (classes)
sorry

Member
Member
sbillard   2010-10-21, 03:59
#3

The wonders of the object model! The decendent classes have only to implement their class specific actions and allow the parent class to do the more general stuff.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.