within Java, you'll need to create a new String object, like
String textCapitalized = new String;
and
then when you receive the web text input (say you call it webText)
you do the capitalize function on webText and set it to textCapitalized, like


textCapitalized = capitalizeFCT(webText);

and then in your SQL insert statement you use the textCapitalized string in the values clause, like

statement = "insert into yourTable (col1, col2, textCol) values (val1, val2, textCapitalized)"

you'll need to include " around the strings, using the escape character of \" of course.


donna



Chris Ripley wrote:

I've been searching long and hard and have come across
a few techniques for changing text entries with lower
case (entered by web user) and changing them to have
first letter capitalized.

in php..... ucfirst
in java .... capitalize


But I'm not having success on the database side. Everything they enter from the web form hits the
database as entered, or raw, or lower cased.


Is there a way to have the text fixed before it hits
the database?

-chris

=====
Chris Ripley
[EMAIL PROTECTED]
KOZE Radio






-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to