ArticleAuthor::OnAuthorTypeDelete PHP 메소드

OnAuthorTypeDelete() 공개 정적인 메소드

Remove author pointers for the given author type.
public static OnAuthorTypeDelete ( integer $p_authorTypeId ) : void
$p_authorTypeId integer
리턴 void
    public static function OnAuthorTypeDelete($p_authorTypeId)
    {
        global $g_ado_db;
        $queryStr = 'DELETE FROM ' . self::TABLE . '
            WHERE fk_type_id = ' . (int) $p_authorTypeId;
        $g_ado_db->Execute($queryStr);
    }

Usage Example

예제 #1
0
 /**
  * @return boolean
  */
 public function delete()
 {
     if (!$this->exists()) {
         return false;
     }
     // Unlink articles
     ArticleAuthor::OnAuthorTypeDelete($this->getId());
     // Unlink authors
     AuthorAssignedType::OnAuthorTypeDelete($this->getId());
     // Delete this author type
     $authorType = $this->getName();
     $result = parent::delete();
     return $result;
 }
All Usage Examples Of ArticleAuthor::OnAuthorTypeDelete