why would you want to do that, when you have the $dbh->quote($pro_prospect_id) function available?
Chuck,
Try to reformat your select to something like this:
$strSQL="select dns_id from dmg.do_not_solicit "; $strSQL.="where dns_prospect_id = '".$pro_prospect_id."'"; $strSQL.=" and dns_area_code = '".$dnc_areacode."'"; $strSQL.=" and dns_phone = '".$dnc_phone."'"; $strSQL.=" and dns_zip_code = '".$dnc_zipcode."'"; $strSQL.=" and dns_pr_branch = '".$pro_pr_branch."'"; $strSQL.=" and dns_pr_client_nbr = '".$pro_pr_client_nbr."'"; $strSQL.=" and dns_pr_client_status = '".$pro_pr_client_status."'";
$sth=$dbh->prepare($strSQL); $sth->execute();
This should enclose the variable in single qutoes ' '.
Patty
This way, you dont have to worry about quotes in the data, like an O'Malley in the column.
-- ------------------------------- Just Your Friendly Neighborhood _SPIDEY_
-----------------------------------------
The information contained in this message may be privileged, confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or any employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer.
Thank you. Paychex, Inc.
