prepare("SELECT `name`,`id` FROM `blog_categories` WHERE `id` = :cat_id "); $get_cat_name->bindParam(':cat_id',$cat_id); $get_cat_name->execute(); $row = $get_cat_name->fetch(PDO::FETCH_ASSOC); $cat_name = $row['name']; $page_title = "News: $cat_name"; } else { $page_title = "News"; } ?> prepare("SELECT `id`,`category_ids`,`name`,`description`,`image`,`date` FROM `blog` WHERE FIND_IN_SET( :blog_id, `category_ids`) ORDER BY `date` DESC LIMIT 12"); $get_blog_content->bindParam(':blog_id',$cat_id); } else { $get_blog_content= $conn->prepare("SELECT `id`,`category_ids`,`name`,`description`,`image`,`date` FROM `blog` WHERE `status` < 1 ORDER BY `date` DESC LIMIT 12"); } $get_blog_content->execute(); $article_count = $get_blog_content->rowCount(); ////used in category side bar ?> → Cube3 Construction

We're yet to add any articles to this news section. Please check back soon…

Go to Latest News
fetch(PDO::FETCH_ASSOC)) { $title = htmlentities($row['name']); $img= str_replace("/media/", "/media-thu/",$row['image']); $date = $row['date']; $date = str_replace("-","/","$date"); $nicedate = nice_date($date,true,false,false,false); $blog_id = $row['id']; $description = $row['description']; $description = trim_text($description,120); $description = strip_tags($description); $nice_blog_querystring = nice_url($title); $url = "/blog-post/" .$nice_blog_querystring ."/" .$blog_id. "/"; //Get category name $cat_ids_arr = explode(",",$row['category_ids']); $cat_id = $cat_ids_arr[0]; $get_cat_title = $conn->prepare("SELECT `name`,`id` FROM `blog_categories` WHERE `id` = :cat_id "); $get_cat_title->bindParam(':cat_id',$cat_id); $get_cat_title->execute(); $row2 = $get_cat_title->fetch(PDO::FETCH_ASSOC); $cat_name = $row2['name']; $cat_url = "/blog-list/".nice_url($cat_name)."/".$cat_id; $cat_str = "$cat_name"; ?>
  • 1
  • 2
  • 3
  • 4
  • */?>