Any ideas onto why I'm getting a syntax error with this?
$this->db->select("DATE_FORMAT(".$this->news_articles_table."'.date_posted', '%M %D, %Y'");
UPDATE:
$this->db->select("DATE_FORMAT(".$this->news_articles_table."'.date_posted', '%M %D, %Y')");
See Question&Answers more detail:osA Database Error Occurred
Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM (
news_articles
) JOINnews_categories
ONnews_articles
.`news_categorie' at line 2SELECT
news_articles
.id
,news_articles
.article_title
,news_categories
.category_name
, CONCAT(first_name, ' ', last_name) AS author, DATE_FORMAT(news_articles'.date_posted','%M
%D,%Y')
,statuses
.status_name
FROM (news_articles
) JOINnews_categories
ONnews_articles
.news_categories_id
=news_categories
.id
JOINusers
ONnews_articles
.author_id
=users
.user_id
JOINstatuses
ONnews_articles
.status_id
=statuses
.id
Filename: /home/xtremer/public_html/kowmanager/modules/news/models/news_model.php
Line Number: 74