Re: Oracle8i large text (CLOB) inserts

From: Date: Wed, 11 Oct 2000 05:10:51 +0000
Subject: Re: Oracle8i large text (CLOB) inserts
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-3506@lists.php.net to get a copy of this message
Hi Chris, Try using this function for each of the test you insert in the db Function RemoveBackSlash($line){ $line = ereg_replace("\\\'","'",$line); $line = ereg_replace("\\\"","&quot;",$line); $line = ereg_replace("\\\\","",$line); return $line; } $body = RemoveBackSlash($body); I used this funtion to remove back slashes which PHP use to insert for every single quote. This works fine for double quotes also. Regards Durrani from India. "Chris Murtland" <chris@studiomoxie.com> wrote in message news:200010110422.AAA14626@mail2.lig.bellsouth.net... I used $body=ereg_replace("'","''",$body); and now it seems I can insert things just fine. Will I run into problems using this approach? Chris > I know this has been addressed before, and believe me, I have searched the archives, but I'm still having trouble figuring out how to insert large amounts of text into Oracle8i using PHP. The server I'm working on doesn't have magic_quotes_sybase turned on. Is there any function I can write myself that will correctly prepare the text to be inserted into Oracle? I also want to preserve line breaks to be able to later convert to html <p> tags. > > Thanks, > Chris Murtland > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#3506) next »