RE: [PHP-DB] Converting values from text to numerical

2002-06-21 Thread Adam Royle
Hi Matt, I think this might be the answer to your problem. It basically checks if the string is an integer. I generally love the PHP automatic type conversion, but sometimes it can trick ya :) if (intval($val) == $val){ // integer stuff } else { // string stuff } Adam > H

RE: [PHP-DB] Converting values from text to numerical

2002-06-20 Thread Russ
sweet-as Russ -Original Message- From: Matthew Nock [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 1:15 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Converting values from text to numerical Hi Russ, thanks for the reply ... if that will evaluate whether a (in this case

RE: [PHP-DB] Converting values from text to numerical

2002-06-20 Thread Matthew Nock
[mailto:[EMAIL PROTECTED]] Sent: Friday, 21 June 2002 3:04 PM To: Matthew Nock; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Converting values from text to numerical Matthew: um how about using the is_int() function to decide if the value from your DB is a number or not? http://www.php.net/manual

RE: [PHP-DB] Converting values from text to numerical

2002-06-20 Thread Russ
form a function on it (such as a calculation) then display the result, otherwise, just display the text. -Original Message- From: Russ [mailto:[EMAIL PROTECTED]] Sent: Friday, 21 June 2002 2:53 PM To: Matthew Nock; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Converting values from text to

RE: [PHP-DB] Converting values from text to numerical

2002-06-20 Thread Matthew Nock
alculation) then display the result, otherwise, just display the text. -Original Message- From: Russ [mailto:[EMAIL PROTECTED]] Sent: Friday, 21 June 2002 2:53 PM To: Matthew Nock; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Converting values from text to numerical "is it possible to

RE: [PHP-DB] Converting values from text to numerical

2002-06-20 Thread Russ
-DB] Converting values from text to numerical I am about to build a database of products that will store features fore ach product in a separate table. I need to be able to store both text and numeric values in this table, but be able to perform mathmatical functions on the numeric variables. is it p

[PHP-DB] Converting values from text to numerical

2002-06-20 Thread Matthew Nock
I am about to build a database of products that will store features fore ach product in a separate table. I need to be able to store both text and numeric values in this table, but be able to perform mathmatical functions on the numeric variables. is it possible to have PHP covert numbers that a