Re: Newbie question about MDB_QueryTool and data quoting
| From: | Lorenzo Alberton | Date: | Tue, 18 Jul 2006 16:04:27 +0000 |
| Subject: | Re: Newbie question about MDB_QueryTool and data quoting | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24688@lists.php.net to get a copy of this message | ||
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, -- Lorenzo Alberton http://pear.php.net/user/quipo ___________________________________________________________________ Quipo Free Internet - 2 email, 150 Mb di spazio web e molto di più. ADSL, Hardware & Software Online Store