11, October 2008

problem with combining text values - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  Databases  >  MySQL
Topic: problem with combining text values
« previous next »
Pages: [1] Print

Author Topic: problem with combining text values  (Read 1120 times)
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6349
38918 credits
Members referred : 374


It's time to use PHP5!


« on: May 30, 2006, 12:12:57 PM »

Hi,

I trying to use to update a field with to pieces of text:

Code:
UPDATE `plaatsnamen` SET tmp_plaats = SUBSTRING(tmp_plaats, 1, 1) LCASE(SUBSTRING(tmp_plaats FROM 2))

but how to put them together? make it one string?


Last blog : Upload images for usage in TinyMCE
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6349
38918 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: May 30, 2006, 12:19:16 PM »

got it:

UPDATE
`plaatsnamen`
SET
tmp_plaats = CONCAT(SUBSTRING(tmp_plaats, 1, 1), LCASE(SUBSTRING(tmp_plaats FROM 2)));


Last blog : Upload images for usage in TinyMCE
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8116
41653 credits
Members referred : 3



« Reply #2 on: May 30, 2006, 02:16:54 PM »

That was fast.

BTW CONCAT can be used with more than one elements, and it is very good for UPDATE's and INSERTS, but very slow in queries in WHERE statements.

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6349
38918 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: May 31, 2006, 01:03:53 PM »

maybe this is a good example for the snippet library:

a similar function like:

Code:
<?php
ucfirst
(strtolower("HELLO WORLD"));


Last blog : Upload images for usage in TinyMCE
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6349
38918 credits
Members referred : 374


It's time to use PHP5!


« Reply #4 on: May 31, 2006, 05:56:34 PM »

maybe this is a good example for the snippet library:
...

In this case we need a new code type : mysql


Last blog : Upload images for usage in TinyMCE
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=2673
Tags : snippets Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  Databases  >  MySQL
Topic: problem with combining text values
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Oct 11, 2008, 05:30:03 PM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 36.904
Total Topics: 7.557
Total Members: 4.149
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: mirela

29 Guests, 3 Users online :

13 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.