Blog problem with "DATE_FORMAT"
Posted: Sun Oct 16, 2011 10:29 pm
Hello.
What should i do?
SELECT `posts`.`post_id` AS `id`, `posts`.`post_title` AS `title`, LEFT(`posts`.`post_body`, 512) AS `preview`, `posts`.`post_user` AS `user`, DATE_FORMAT(`posts`.`posts_date`, `%d/%m/%Y %H:%i:%s`) AS `date`, `comments`.`total_comments`, DATE_FORMAT(`comments`,`last_comment`, `%d/%m/%Y %H:%i:%s`) AS `date`) AS `lastcomment` FROM `posts` LEFT JOIN ( SELECT `post_id`, COUNT(`comment_id`) AS `total_comments`, MAX(`comment_date`) AS `last_comment` FROM `comments` GROUP BY `post_id` ) AS `comments` ON `posts`.`post_id` = `comments`.`post_id` ORDER BY `posts`.`post_date` DESCand i get this error. #1582 - Incorrect parameter count in the call to native function 'DATE_FORMAT'
What should i do?