Re: documentation on pg_escape_string()
| From: | Joe Conway | Date: | Tue, 18 Mar 2003 01:07:41 +0000 |
| Subject: | Re: documentation on pg_escape_string() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140064@lists.php.net to get a copy of this message | ||
Dennis Gearon wrote:
Anyone know where to find documentation on this? Who knows what it escapes?From PostgreSQL source (~/pgsql/src/interfaces/libpq/fe-exec.c): 8<-------------------------------------------------------------------- /* --------------- * Escaping arbitrary strings to get valid SQL strings/identifiers. * * Replaces "\\" with "\\\\" and "'" with "''". * length is the length of the buffer pointed to by * from. The buffer at to must be at least 2*length + 1 characters * long. A terminating NUL character is written. * --------------- */ size_t PQescapeString(char *to, const char *from, size_t length) 8<-------------------------------------------------------------------- I presume the PHP function is just a wrapper around this one (but did not actually check). HTH, Joe