Re: serialize datatype for MDB2
| From: | Lukas Smith | Date: | Wed, 24 May 2006 07:53:41 +0000 |
| Subject: | Re: serialize datatype for MDB2 | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-42585@lists.php.net to get a copy of this message | ||
Daniel Convissor wrote:
Hey Lukas: On Tue, May 23, 2006 at 10:51:09PM +0200, Lukas Smith wrote:In MDB2 I have an explicit method for that: implodeArray() http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2_Driver_Datatype_Common.html#methodimplodeArrayI 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 likeWHERE x IN (.$db->quote($array).)andUPDATE 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.OK, I will take that as a -0,5 vote .. regards, Lukas