CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 DBFormat for string

Print topic Send  topic

Author Message
Timmer
Posted: 09/08/2005, 8:14 PM

I have a db field for telephone number and and the field marked as follows:

Type: text
Format: (000) 000-0000

MySQL set to text 10 max varchar

Want to store as 10 digit numeric value, but it is storing the value as (818) 998-

How can I fix this?
What are values for DBFormat ? (have seen lots of date formats for the DBFormat property but not strings)..

Thanks,
Timmer
peterr


Posts: 5971
Posted: 09/09/2005, 10:51 AM

I think that text fields cannot be formatted 2-way, only dates and numeric. Therefore if you like to use formatting then you could set the format to "(000) 000-0000" and change the database field type to numeric, like Integer or Longint. Then also change the control type to integer.
Alternatively you can re-format the text before updating the database.

Also, take a look at how to use input masking, as shown in the "Data Entry with Input Mask" example: http://examples.codecharge.com/ExamplePack/InputMask/InputMask.php. This won't solve your problem and you may still need to reformat the text, but it's just another approach to formatting text.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.