Re: [DB] returning typed data when fetching rows
| From: | Hans L | Date: | Fri, 06 Aug 2004 14:45:30 +0000 |
| Subject: | Re: [DB] returning typed data when fetching rows | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-32484@lists.php.net to get a copy of this message | ||
Hi Dan,
Beside the array data type, I don't see much value in strongly typing the output because PHP isn't a strongly typed language. Strings get converted to numbers as needed, etc.I'm surprised you say that. I think for databases the weak typing can cause lots of problems. I find I tend to need strong typing for anything coming out of databases, since there are usually important distinctions to make between values that PHP considers equivalent, i.e. false == 0 == NULL == "" In particular, it is the SQL distinction between NULL and a value that is unavailable when using PHP's loose typing. Hans