Re: Newbie question about MDB_QueryTool and data quoting

From: Date: Tue, 18 Jul 2006 16:10:30 +0000
Subject: Re: Newbie question about MDB_QueryTool and data quoting
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24689@lists.php.net to get a copy of this message
Hi Lorenzo, Thanks for the reply. I figured that is the case. I'm wondering if you have given any thought to how QueryTool could handle quotes for the listed methods, or is that not even on the radar (maybe it is an all together bad idea for reasons that just aren't apparent to me). I think ideally QueryTool would be consistent throughout with its handling of quoting, making the API that much easier to use. As an aside, I saw a few bugs where logged regarding QueryTool's non use of MDB[2] column type abstraction, and a few responses indicated that you just didn't have the time to consider this. Is that still the case? Or, perhaps others have come on board to help out with such requests? I'd like to get a better feel for where MDB_QueryTool stands, and where it is going. Thanks again, Michael Lorenzo Alberton wrote:
Hi Michael,
I'm taking MDB_QueryTool for a spin, and have a question that I cannot find an appropriate answers to. Looking under the hood, I see that QueryTool handles quoting of _most_ data for the various SQL that can be generated, but not in all spots. For example, setting a where condition requires that I quote the value myself, and cannot rely on QueryTool to do this form me. I am wondering if this is by design,
yep. Since setWhere() accepts a generic string, i.e. not structured data, it cannot know which part of it must be quoted. You are supposed to do it.
or a limitation of the current version. Also, what methods, besides setting where conditions, must I be careful to escape my data manually?
I think these are the methods that require your attention: addHaving() addWhere() add*Join() setHaving() set*Join() setWhere() HTH Regards,
-- Michael Caplan - Zend Certified PHP Engineer Programming Manager Apison Communications Suite 110, 151 Provost Street New Glasgow, NS, Canada B2H 2P6 Phone: (902) 695-3375 Toll Free: (800) 845-6998 Fax: (902) 695-7777 email: michael@apison.com URL: http://www.apison.com Specializing in web development, graphic design and Internet marketing

« previous php.pear.general (#24689) next »