Escaping SQLite

Escaping SQLite

am 01.10.2007 07:52:40 von roberto

I have been using pg_escape_string from the php5-pgsql library even
though I am using SQLite. This is because I've found no equivalent for
SQLite. Can someone tell me how to replace this with a series of
functions (likely preg_replace()) so that I no longer need the
dependency on php5-pgsql?

Or, does anyone know where I can look at the C source for
pg_escape_string() so that I can try to duplicate it in PHP code?

Re: Escaping SQLite

am 01.10.2007 08:17:16 von Michael Fesser

..oO(Roberto)

>I have been using pg_escape_string from the php5-pgsql library even
>though I am using SQLite. This is because I've found no equivalent for
>SQLite. Can someone tell me how to replace this with a series of
>functions (likely preg_replace()) so that I no longer need the
>dependency on php5-pgsql?

What about sqlite_escape_string()? Or PDO?

Micha