コード例 #1
0
ファイル: category.php プロジェクト: Glonum/tz_portfolio
 /**
  * Method to delete a node and, optionally, its child nodes from the table.
  *
  * @param   integer  $pk        The primary key of the node to delete.
  * @param   boolean  $children  True to delete child nodes, false to move them up a level.
  *
  * @return  boolean  True on success.
  *
  * @see     http://docs.joomla.org/JTableNested/delete
  * @since   2.5
  */
 public function delete($pk = null, $children = false)
 {
     if ($pk) {
         $query = 'DELETE FROM #__tz_portfolio_categories' . ' WHERE catid = ' . $pk;
         $db = JFactory::getDbo();
         $db->setQuery($query);
         if (!$db->query()) {
             var_dump($db->getErrorMsg());
             return false;
         }
     }
     return parent::delete($pk, $children);
 }
コード例 #2
0
ファイル: category.php プロジェクト: RuDers/JoomlaSQL
 /**
  * Method to delete a node and, optionally, its child nodes from the table.
  *
  * @param   integer  $pk        The primary key of the node to delete.
  * @param   boolean  $children  True to delete child nodes, false to move them up a level.
  *
  * @return  boolean  True on success.
  *
  * @see     http://docs.joomla.org/JTableNested/delete
  * @since   2.5
  */
 public function delete($pk = null, $children = false)
 {
     return parent::delete($pk, $children);
 }