Re: serialize datatype for MDB2
| From: | Daniel Convissor | Date: | Tue, 23 May 2006 22:42:03 +0000 |
| Subject: | Re: serialize datatype for MDB2 | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-42582@lists.php.net to get a copy of this message | ||
Hey Lukas:
On Tue, May 23, 2006 at 10:51:09PM +0200, Lukas Smith wrote:
>
> I have refrained from adding abstract datatypes like these uptil now.
> Recently I added a call to serialize if someone passes an array to the
> quote() method without specifying an explict datatype to use. So I have
> sort of added 1/4 of the abstract "serialize" datatype.
Haven't looked at the MDB2 code involved here since I need to run, but
just commenting... In the escape method in application I work on, when
passing in an array, we explode it with ",". This is helpful with things
like
WHERE x IN (.$db->quote($array).)
and
UPDATE x SET some_set = .$db->quote($array).
As far as serializing and creating a serialize data type, well, it is
handy. I have a feeling it may be best to leave it in userland, but it's
not a big deal.
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409