RE: [PEAR-DEV] Re: metapear datatypes

From: Date: Thu, 21 Mar 2002 17:07:42 +0000
Subject: RE: [PEAR-DEV] Re: metapear datatypes
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-5070@lists.php.net to get a copy of this message
> If the database API is not good enough to reveal the type info required, > I use a simple heuristic: > > if (! is_numeric($val)) $conn->qstr($val); > > eg. I only quote non-numeric variables. This normally works with dates > because most databases accept dates as strings fortunately. Some databaes even allow integers to be quoted (I think most opensource RDBMS do for example) Lukas Smith smith@dybnet.de _______________________________ DybNet Internet Solutions GbR Alt Moabit 89 10559 Berlin Germany Tel. : +49 30 83 22 50 00 Fax : +49 30 83 22 50 07 www.dybnet.de info@dybnet.de _______________________________

« previous php.pear.dev (#5070) next »