Re: Converting values from text to numerical

From: Date: Fri, 21 Jun 2002 06:21:51 +0000
Subject: Re: Converting values from text to numerical
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-19936@lists.php.net to get a copy of this message
yes you can switch the type of var for examle with: $number = (integer)$textvar; But if you do store it as a textfield you want be able to do some special sql stuff directly in mysql. For example if you store the date as text in the db you want be able to filter out entries which are between x and y. Good luck, Andy -- ---------------------------------------------------- http://www.globosapiens.net Global Travellers Network! "Matthew Nock" <matthew@mnc.com.au> schrieb im Newsbeitrag news:DOEEJNAFHHEJMCCGIDPDGEBHCNAA.matthew@mnc.com.au... > 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 are stored as text strings > back into values it can calculate with? >

« previous php.db (#19936) next »