We have a table that has a $row->title field. I want to copy them all over to the "titletag" field. But I want to do it so it's in Capitalized format:
this is a field > This Is A Field.
Thankfully the words are not A, Is, To.... So it's fine. How do I do that?
Can the content of a field be sent to Capitalized?
Moderator: General Moderators
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Can the content of a field be sent to Capitalized?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
Re: Can the content of a field be sent to Capitalized?
MySQL doesn't have a titlecase function, but you can write one in SQL or you can do it in PHP and bulk update.
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Re: Can the content of a field be sent to Capitalized?
Yes - I guess I can copy them over, then do an update on all to be titlecase. Thanks anyway.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.