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 's-easy-guide-to-final-cut-pro-x-now-sh'' at line 1Query is SELECT *,date_format(dateEntered, '%D') as dateDay,date_format(dateEntered, '%b') as dateMonth, date_format(dateEntered, '%Y') as dateYear from newsItems where shortURL='rick-young's-easy-guide-to-final-cut-pro-x-now-sh'