On Tue, Jun 3, 2008 at 4:28 PM, PJ <af.gourmet@xxxxxxxxxxxx> wrote: > I don't know if this is the right list, it seems php and postgresql are > rather interdependent in the webside I am debugging :(, but here goes: > > I'm getting this error: > pg_execute() [<a href='function.pg-execute'>function.pg-execute</a>]: No > array passed E_WARNING > > for this line of code: > if( !($r=pg_execute($dbh, $query)) ) > > I suspect that I am not connecting to the database on the server... > How can I check my connection from withing the code or some other way? > Are the $dbh and $query built-in variables in postgres or php - I'm afraid > that I'm rather a bumbling newbie :) > > I can connect from XP to the FreeBSD 7.0 server and I can access and read > the files and the samba connection appears to be correct... but I can't > connect to the database from phped debugger > Can't figure this out... > Help ??? you definitely need to create a connection to the database before you make any queries. w/ the mysql api, if you dont supply function invocations the connection parameter (for those that require it) the last created connection will be used auto-magically by php. its likely to be the same way in the postgres api. also, regarding those variables, no they are not any sort of integrated or php specific values, they are local to your application. $dbh is likely to be the connection to the database, and $query should be some sql you want the database to execute. -nathan