PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Apr 30, 2017 11:51 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue May 17, 2016 3:36 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4160
Location: United Kingdom
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?

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
PostPosted: Tue May 17, 2016 6:20 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6229
Location: Montreal, Canada
MySQL doesn't have a titlecase function, but you can write one in SQL or you can do it in PHP and bulk update.

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
PostPosted: Tue May 17, 2016 7:02 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4160
Location: United Kingdom
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Majestic-12 [Bot], Yahoo [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group