Should I start pulling my hair out yet???

From: Date: Tue, 16 Nov 1999 19:39:34 +0000
Subject: Should I start pulling my hair out yet???
Groups: php.version4 
Request: Send a blank email to php-version4+get-6311@lists.php.net to get a copy of this message
Ok, here's the scenario. I have a Progress database, which includes a table called "part". In the part-num field there is data that includes both single and double quotes. Over a year ago, I started working with PHP3 and the Openlink ODBC drivers. I was able to get every scenario to work, except for single quotes. No matter what I tried (various methods of escaping the quotes), I couldn't get a query which includes single quotes in the part-num field to work properly (the result was typically a syntax or other kind of error, depending on what I tried). The form that's supposed to work is doubling up the single quotes. I finally decided it was an Openlink bug, and opened a support case with them. After over a year of going back & forth with them, and a lot of time waiting, they finally got me up & running on the 3.2 version of the Openlink drivers a couple of weeks ago, which solved the problem. So now, feeling great about that, I decided to try PHP4. We'll ignore the glitches I encountered - suffice to say that I finally succeeded today in getting it and Apache 1.3.9 compiled & working (apparently) well. So I started testing things, and now the single quotes problem is back in all of its glory. I'd love to blame this on Openlink, but it was working properly with PHP-3.0.11, so I can only assume that something has changed in PHP4's ODBC support. I've been following the beta list since the beginning, so I know that there has been a fair amount of activity in this area. I've tried escaping the quotes with backslashes, I've tried just about every concievable way of escaping them that I could think of. Nada. Here's an example of a query: select part.part-num, part.description, vendor.name, retail-price, partloc.location, partloc.qty-onhand, partloc.qty-commit from part, partloc, vendor where part.part-num = 'GY12''P' and partloc.part-num = part.part-num and part.vendor-num = vendor.vendor-num I know this is a bit long, but the relevant part is really just: where part.part-num = 'GY12''P' The actual part number is "GY12'P". Any assistance would be gratefully appreciated. Brian

« previous php.version4 (#6311) next »