We need to set ALL entries in three MySQL Database fields to be in all UPPERCASE.
Is there a script that can be run to do this?
These are used dynamically for META TAGS, so it's not about how to render it on screen.
Can certain DB Fields be set to UPPERCASE?
Moderator: General Moderators
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Can certain DB Fields be set to UPPERCASE?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Re: Can certain DB Fields be set to UPPERCASE?
Sorry? Where in there does it say how to convert a field to UPPERCASE within the database itself?
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 certain DB Fields be set to UPPERCASE?
I linked a MySQL function. You're supposed to use that in an UPDATE query.
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Re: Can certain DB Fields be set to UPPERCASE?
Sorry didn't see a function that explained it would do that.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Can certain DB Fields be set to UPPERCASE?
As in: UPDATE foobar SET foo=UPPER('bar') WHERE id='foo'
You can also use the PHP strtoupper() function.
You can also use the PHP strtoupper() function.
(#10850)
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Re: Can certain DB Fields be set to UPPERCASE?
But you cannot run a script within phpmyadmin (directly on the server) to set those fields to be UPPERCASE ?
What is "bar" ??
Code: Select all
UPDATE products SET metadescription=UPPER('bar')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 certain DB Fields be set to UPPERCASE?
The field.
You need to take a day out of your busy schedule to learn SQL. Not just the syntax but how it works and what it is capable of. Because there is much more to it than simple INSERT and SELECT statements.
Code: Select all
UPDATE products SET metadescription = UPPER(metadescription)