* -k. wrote: > ... > pg_exec(): Query failed: ERROR: invalid regular expression: invalid escape \ sequence . > > It seems to happen when using just a "\" or text ending with a "\" but not if a "\" is in the > middle of a string of text. I would guess you have magic_quote_gpc on, you can check this: var_dump(get_magic_quotes_gpc()); > ... > $user_item = pg_escape_string($_POST['user_item']); > > $dbconn = pg_connect('some connection string that works'); > $query = "SELECT * FROM some_table WHERE some_col = '$user_item' "; Try an: echo htmlentities($query); And you'll see the problem with the query. Curt. -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php