diff options
Diffstat (limited to 'ext/pgsql/tests/18pg_escape_bytea.phpt')
-rw-r--r-- | ext/pgsql/tests/18pg_escape_bytea.phpt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/pgsql/tests/18pg_escape_bytea.phpt b/ext/pgsql/tests/18pg_escape_bytea.phpt index 43f98c446..5f52a17d9 100644 --- a/ext/pgsql/tests/18pg_escape_bytea.phpt +++ b/ext/pgsql/tests/18pg_escape_bytea.phpt @@ -8,10 +8,11 @@ PostgreSQL pg_escape_bytea() functions include('config.inc'); +$db = pg_connect($conn_str); + $image = file_get_contents(dirname(__FILE__) . '/php.gif'); $esc_image = pg_escape_bytea($image); -$db = pg_connect($conn_str); pg_query($db, 'INSERT INTO '.$table_name.' (num, bin) VALUES (9876, \''.$esc_image.'\');'); $result = pg_query($db, 'SELECT * FROM '.$table_name.' WHERE num = 9876'); $rows = pg_fetch_all($result); |