*/ class Fishpig_Wordpress_Model_Mysql4_Image extends Fishpig_Wordpress_Model_Mysql4_Post_Attachment_Abstract { public function _construct() { $this->_init('wordpress/image', 'ID'); } public function isImagePostName($postName) { $select = $this->_getReadAdapter() ->select() ->from($this->getMainTable(), 'ID') ->where('post_type=?', 'attachment') ->where('post_name=?', $postName) ->limit(1); return $this->_getReadAdapter()->fetchOne($select); } }