rendered paste bodypublic function next_post_link($post)
{
$next_link = '';
$next_post= false;
DB::set_fetch_mode( PDO::FETCH_CLASS );
DB::set_fetch_class( 'Post' );
$next_post=
DB::get_row( 'select * from {posts} where content_type = ? and status = ? and pubdate > ? order by pubdate asc',
array(Post::type('entry'), Post::status('published'), $post->pubdate), 'Post' );
if( ( $next_post ) != false ) {
$next_link= '<a href="' . $next_post->permalink. '" title="' . $next_post->title .'" >' . $next_post->title . ' >></a>';
}
return $next_link;
}
public function prev_post_link($post)
{
$prev_link = '';
$prev_post= false;
DB::set_fetch_mode( PDO::FETCH_CLASS );
DB::set_fetch_class( 'Post' );
$prev_post=
DB::get_row( 'select * from {posts} where content_type = ? and status = ? and pubdate < ? order by pubdate desc',
array(Post::type('entry'), Post::status('published'), $post->pubdate), 'Post' );
if( ( $prev_post ) != false ) {
$prev_link= '<a href="' . $prev_post->permalink. '" title="' . $prev_post->title .'" >' . '<< ' .$prev_post->title . '</a>';
}
return $prev_link;
}