[PHP-DB] same connection to access two different database?

2002-01-29 Thread Vincent Ma

Hi everyone:

  is it possible to use one connect to access two database in postgreq,
because i would like to use subquery to do same search.  on the fly in
postgreq must faster a lot than evaluate in php code...

A, B belong to different database...
sql :  select * from A in ( select * B)

Vincent Ma



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] PostgreSql query help....

2001-11-19 Thread Vincent Ma

Hi everybody:

  I would like to ask why the error occur when retrieve current sequence
number.  Eg. select currval('student_id_seq') is not working, and warning
prompt student_id_seq.currval is not yet defined in this session.

However, this is work for the select nextval();

do anyone know how to get current sequence number, in php.  Thank for your
help

Vincent Ma



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] [PHP-PostgreSQL] table field name case senstive problem

2001-11-13 Thread Vincent Ma

Hi everyone:

I found the problem when retrieve data from table or field which are
mix-case.  I means table or field name like accommdationType. contain
lower and upper case character.

For example:
Query select compID from table
after pg_exec()  -- select compid from table

Thus, I got error message said no attribute **compid***.  the field or
table become lower case.

 Is anyone know how to prevent pg_exec case conversion.  I guess may put
some special character around the field name.

Thank for any help

Vincent Ma



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]