Re: [metabase-dev] get*Value() usability question
| From: | Manuel Lemos | Date: | Thu, 12 Dec 2002 07:27:47 +0000 |
| Subject: | Re: [metabase-dev] get*Value() usability question | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-11576@lists.php.net to get a copy of this message | ||
Hello,
On 12/10/2002 08:24 AM, Lukas Smith wrote:
I am coding on an application atm and I see myself frequently doing IN statements with data arrays that I gathered in a session. So you could do something like this: $query = "SELECT * FROM foo_table WHERE foo_field IN".implode(",", $bar_array).")"; Now this doesn’t work if I want to use MDB's Datatype conversion methods like getTextValue() etc. array_walk comes to mind as a possible solution, but not a very nice one as I don’t know how to handle the fact that these are methods of an object. 1) Does someone have a good idea how to do this? 2) The current get*Value() methods don’t allow you to pass an array to them. Would this be a worthwhile addition? Should the current method work on normal strings and arrays (adding an if statement) or should second class of method be introduced (bloating the API even further).I don't think it is a good idea to bloating the API even further with yet another little feature. Many little features like these scare people away because they are not very much used and just make larger the code that is already large. As I mentioned before, I think it would be more valuable to invest time on things that are really needed like the rest of the drivers that need to be ported. If you are really concerned in becoming more productive in database application development, there is Metastorage that has preciely that goal. Since it generates all the code that you need just by specifying in the component classes XML definition the functionality that your applications will use, the code already comes out optimized to your context and you save days or even weeks that you would usually spend writing that code by hand. http://www.meta-language.net/metastorage.html -- Regards, Manuel Lemos