Re: [PHP] pdo and dabase schema

2008-10-14 Thread Chris

Alain Roger wrote:

Hi,

is there a way with PDO class to not have:
- to execute a simple SET search_path TO myschema;


can you alter the postgres users path?

alter user  set search_path to new_schema, current_schemas();

or some variation on that.


- and after to fletch another SQL request, like select to be sure that the
SQL statement will be perform on this schema ?
(basically i want to do it in 1 step)


You can't. After you connect you have to change the schema.

--
Postgresql & php tutorials
http://www.designmagick.com/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] pdo and dabase schema

2008-10-14 Thread Alain Roger
Hi,

is there a way with PDO class to not have:
- to execute a simple SET search_path TO myschema;
- and after to fletch another SQL request, like select to be sure that the
SQL statement will be perform on this schema ?
(basically i want to do it in 1 step)

because i tried to specify the schema into my sql statement but in this case
PDO returns me 0 record.
thanks a lot,

-- 
Alain

Windows XP SP3
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008