For Programmers: Free Programming Magazines  


Home > Archive > Clarion > August 2005 > How would I duplicate the php addslashes( ) command in clarion?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How would I duplicate the php addslashes( ) command in clarion?
alorama

2005-08-12, 4:59 pm

Hello All

I have some large text fields that I want to add to my mysql
database. This works fine when I transfer my data via odbc into the
mysql db. However it is very slow for large sets of data.
If however I read my large btrieve file with the large text field in
it, and write it to another text file for importation into mysql via
the mysql command line, it would be really fast.
Right now it takes a few days. I think I could get It down to a few
hours.
Does anybody have some clarion code or a technique that would do this
for me? Below is a description of the php addslashes command which I
have used in the past to enable me to add mysql records to my mysql db.

Thanks

Description of the addslashes command from php.net
string addslashes ( string str )


Returns a string with backslashes before characters that need to be
quoted in database queries etc. These characters are single quote ('),
double quote ("), backslash (\) and NUL (the NULL byte).

An example use of addslashes() is when you're entering data into a
database. For example, to insert the name O'reilly into a database, you
will need to escape it. Most databases do this with a \ which would
mean O\'reilly. This would only be to get the data into the database,
the extra \ will not be inserted. Having the PHP directive
magic_quotes_sybase set to on will mean ' is instead escaped with
another '.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com