Re: Newbie question about MDB_QueryTool and data quoting

From: Date: Tue, 18 Jul 2006 16:36:59 +0000
Subject: Re: Newbie question about MDB_QueryTool and data quoting
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24690@lists.php.net to get a copy of this message
Hi Michael,
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).
QT can't handle quotes for the aforementioned methods for the simple reason I've told you in my last mail: they're unstructured strings, without any boundary or field separator. They can be any of these (imagine they're passed to setWhere()): 1) field = 'value' // 2nd member is a value to match: quotes required. 2) field1 = 'value1' AND field2 = 'value2' // multiple conditions: a "smart quoting" algorithm // that finds the '=' char to separate the field name // from its value would fail. 3) field = otherfield + 1 // 2nd member is the name of another field to match: // it must NOT be quoted. You know it, QT can't know it.
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?
unfortunately yes. There are some requests to add escape quotes around field names, so it can work with field names called with reserved words too. The simple answer I give in these cases is: rename your field to anything but a reserved word. Anyway, if someone really needs it, I'm not against adding this feature to MDB_QT, I just don't have the time/motivation to do it myself. Patches are welcome :)
Or, perhaps others have come on board to help out with such requests?
nope, just someone who asked if patches were welcome. They are, but I didn't receive anything. 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

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