0

In Select query I'm using ucfirst for getting character in caps.

My Select Query:

SELECT det.Id AS id,
       ucfirst(det.title) AS title,
       DATE_FORMAT((det.dateInt), '%M %d, %Y') AS dateint
FROM img_details det
ORDER BY Id DESC

When I'm using this query in Mysql it is showing error like:

FUNCTION admin.ucfirst does not exist.

Please give any suggestions.Thanks in Advance.

Sadikhasan
  • 18,365
  • 21
  • 80
  • 122
Janani
  • 67
  • 1
  • 12

1 Answers1

0

Try with UCASE function in mysql. There is no function available in mysql named with ucfirst

SELECT det.Id AS id,
       UCASE(det.title) AS title,
       DATE_FORMAT((det.dateInt), '%M %d, %Y') AS dateint
FROM img_details det
ORDER BY Id DESC
Sadikhasan
  • 18,365
  • 21
  • 80
  • 122
  • It is working but everything coming in caps.I need only first letter to be in Caps.Thanks for your answer @Sadikhasan – Janani Oct 07 '14 at 09:13