RE: [PHP] php code

From: Date: Tue, 21 Oct 2003 11:36:49 +0000
Subject: RE: [PHP] php code
Groups: php.general 
Request: Send a blank email to php-general+get-166939@lists.php.net to get a copy of this message
[snip] Actually i have created the field type as varchar..i am need to insert some decimal values in that varchar field and use that values for calculation...so it is possible to store the float value eventhough i specified as varchar ?..and also i can use that values for calculation ?? [/snip] This is more of a SQL question, but the short answer (with PHP) is yes, you can use 'values' stored in varchar fields for calculation in PHP. You may have to retrieve the value from the DB and then cast it to your liking. See http://www.php.net/settype (it may be set_type, I am working on less than one cup of coffee this morning thus far.

« previous php.general (#166939) next »