473,396 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Numbers in VARCHAR field in mySQL database problem

I'm completely new to PHP (jumped ship this week from MSAccess and ASP to MySql and PHP) and I'd appreciate some help with leading zeros in telephone numbers.

I've got a field with type VARCHAR(20) which contains phone numbers. Unfortunately, the numbers containing leading zeros (0018005555555) or the international calling sign "+" (eg +18005555555) appears briefly (for about a second) then disappears when viewed in a browser (IE7) - refreshing the screen gets the same results. Here's what I've worked out.

Mozilla Firefox works fine (ie displays fine).
IE7 produces the problem.
Numbers beginning with 0 are ok.
Numbers beginning with 00 or + are the problem.
The data is there in the table (no problems with mySQL).
There are not changes being made to the table at the time.
The table column width is big enough.
The field length is being enough.

Expand|Select|Wrap|Line Numbers
  1. <td width="160"><?php echo $row_rsMusic['Phone1']; ?></td> 
I'm wondering if it's PHP or javascript (which I know even less about, sadly).
Many thanks in advance.
Nov 2 '07 #1
4 2729
Atli
5,058 Expert 4TB
Hi Vlinder. Welcome to TSDN!

That sounds weird.
Can you take a look at the source view in a browsers that is giving you this problem and check if the number in there is as it should be?

If it is, this might be a bug in the browsers rendering engine. (In IE's case that would not be a huge surprise.). You may want to try splitting it and displaying it in two (or more) separate pieces.

If it is not, it could be a problem with either your SQL queries or your PHP code (or JavaScript if that's somehow involved), in which case it will help if you posted the code here. (In [code] tags please).
Nov 2 '07 #2
Had brain wave whilst chopping an onion (ahem): could it be the Skype add on?

Disabled the Skype add on in IE7 and the numbers are now displaying fine.

Now I just have to find a way of getting the Skype add on to recognize the international numbers. Any ideas?

Sorry for posting in the wrong forum though.
Nov 2 '07 #3
Atli
5,058 Expert 4TB
I'm not familiar with the Skype add-on.

But if disabling it fixed the problem I would have to guess the add-on is either doing something really smart that we don't understand, or something really stupid that it's developers didn't design it for.
Nov 3 '07 #4
For help with number formatting with Skype add-on go to:

http://skype.otherlinks.co.uk/page.a...ber_formatting
Nov 14 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Berislav Lopac | last post by:
I was lately wandering what would be the advantage of using varchar instead of text column data type in a database (specificall MySQL, but this might also be the case for other databases)? I mean,...
7
by: James | last post by:
I am currently working on a PHP based website that needs to be able to draw from Oracle, MS SQL Server, MySQL and given time and demand other RDBMS. I took a lot of time and care creating a...
8
by: Randell D. | last post by:
Folks, I once read an article in Linux Format whereby a technical writer had made performance recommendations on a LAMP environment. One of the points raised was for small columns in a database,...
1
by: Boris Wilhelms | last post by:
Hello all, at first, sorry for my bad English, I’ll give my best  We have a strange problem reading Text- and VarChar-Fields. Our configuration: -Windows 2003 Server -MySQL Server 3.23.36...
3
by: usenet | last post by:
I have inherited a table where date information was saved from PHP as a VARCHAR. (Sigh.) This means that the so-called date fields look like this : August 1, 2005, 9:09 am EDT October 13, 2004,...
0
by: sfh | last post by:
Greetings all, I have a question concerning primary key types. In the past, I have always created tables with a primary key as an "int" such as: CREATE TABLE color_id ( color_id int(10)...
1
by: sfh | last post by:
Greetings all, (I had posted this in MS SQL on accident, my apologies :( ) I have a question concerning primary key types. In the past, I have always created tables with a primary key as...
4
by: tcfin | last post by:
Hi, i have a problem to make a transtype from field XX varchar(20), example : 19 200 340,56 to field YY integer, required : 19200340
0
by: maheshmohta | last post by:
Background Often while remodeling legacy application, one of the important tasks for the architects is to have an optimum usage of storage capabilities of database. Most of the legacy applications...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.