Created
April 4, 2011 03:53
-
-
Save yuya-matsushima/901111 to your computer and use it in GitHub Desktop.
seezoo1.0.1のfeed配信機能追加用の追加メソッド
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* blogページのmeta情報取得 | |
*/ | |
function get_blog_meta() | |
{ | |
$sql = | |
'SELECT ' | |
. 'PV.page_title, ' | |
. 'PV.meta_title, ' | |
. 'PV.meta_keyword, ' | |
. 'PV.meta_description ' | |
.'FROM ' | |
. 'page_paths AS PP ' | |
.'JOIN ' | |
. 'page_versions AS PV ' | |
.'ON ' | |
. 'PP.page_id=PV.page_id ' | |
.'AND ' | |
. 'PV.is_public = 1 ' | |
.'AND ' | |
. 'PP.page_path = ? ' | |
.'LIMIT 1'; | |
$query = $this->db->query($sql, array('blog')); | |
if($query->num_rows() > 0) | |
{ | |
return $query->row(); | |
} | |
else | |
{ | |
return array(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment