Re: adding bug info infront of sql query
| From: | Hans Lellelid | Date: | Mon, 12 Jan 2004 17:22:55 +0000 |
| Subject: | Re: adding bug info infront of sql query | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-25009@lists.php.net to get a copy of this message | ||
Daniel Convissor wrote:
Pardon me while I change my mind. I wasn't thinking clearly and missed the the real issue here. It would be fairly trivial to adjust the regular expression in isManip() to not get tripped up by comments. I think I'll do it. --Dan Yes ... well, the regex does get a little messy, but should still be possible to do it generically. I guess other valid comments include:/* for some databases */ // another comment REM apparently this is a comment in some -- is also a comment, but in Oracle it can have semantic value # is a comment for MySQL, at least I've found it easier to check to see whether a query is a 'SELECT' query and otherwise assume that it's a manip query. There are so many variations of manip SQL that are not covered by current code in MDB (and I assume DB). Of course, I still think the better solution is to let developers specify to avoid the regexp. Hans