AW: [freetds] freetds, php, cron

Oliver Baden obaden at yahoo.de
Thu Aug 14 00:23:02 EDT 2003


Hi Eddie,

>What language are you using for your script insertion?
>Perl or PHP?

I'm using PHP

>For PHP you need to use the addslashes() function to escape characters 
>for Perl you need to hmmmm...lemme try and remember.
>Or this for perl... the quote() function being the fixer of the
problem.

I am using my own function to simulate an addslashes function for mssql

Thanks for the advice but this is definitely not the problem. It seems
to be a timing-problem by freetds that the statement is not interpreted
properly before being sent to mssql-server. I am using my own function
which uses str_replace to replace all characters like single ' to '' and
\ to \\ etc. 

As said before I believe it to be a timing or locale problem since the
first statement in the loop does not create an error. 

PHP generates a statement for mssql and mssql gives me an error that it
cannot compute the statement because somehow characters like -, >,<,=,!
are interpreted as apostrophes.

Thanks again for your thoughts and ideas!

Oliver




More information about the FreeTDS mailing list