List:General Discussion« Previous MessageNext Message »
From:Fred Read Date:April 21 1999 10:51am
Subject:Re: Is there a way to know if It's a number?
View as plain text  
Jochen Haeberle wrote:
> ...
> I am having problems at my website the people are sometimes entering
> strings into fields that will be calculated with later on in MySQL
> (currency units). I know there are other solutions to checking if a
> value is a number (including JavaScript), but I do not want to use
> another solution just for this.

This is really a data validation problem and is best handled 
BEFORE the data goes into the database. Presumably, you have 
some sort of CGI script that accepts the data from the form, 
possibly processes it and then puts it in the database. This 
is probably the place to validate the data. If anything fails 
the form can be represented...
-- 

If it ain't opinionated, it ain't Rich Teer.
Thread
help! restoringpete collins19 Apr
  • Re: help! restoringChristian Mack20 Apr
    • Is there a way to know if It's a number?Jochen Haeberle20 Apr
      • Is there a way to know if It's a number?Michael Widenius21 Apr
        • Re: Is there a way to know if It's a number?Paul DuBois21 Apr
  • Re: Is there a way to know if It's a number?Benjamin Scherrey21 Apr
    • Re: Is there a way to know if It's a number?Thimble Smith21 Apr
  • Re: Is there a way to know if It's a number?Fred Read21 Apr
Re: Is there a way to know if It's a number?Christopher R. Jones21 Apr
  • Re: Is there a way to know if It's a number?Graham Ashton22 Apr