[PHP-DB] postgresql connection management

2008-02-28 Thread jim white
I am running several web sites on one server, each of which connects to a different Postgresql database. I use some include files to load functions and classes. If I put pg_connect at the start of the include file, then sometimes I do not connect to the correct database from functions in a

Re: [PHP-DB] postgresql connection management

2008-02-28 Thread Chris
jim white wrote: I am running several web sites on one server, each of which connects to a different Postgresql database. I use some include files to load functions and classes. If I put pg_connect at the start of the include file, then sometimes I do not connect to the correct database from

Re: [PHP-DB] postgresql connection management

2008-02-28 Thread jim white
Chris wrote: jim white wrote: I am running several web sites on one server, each of which connects to a different Postgresql database. I use some include files to load functions and classes. If I put pg_connect at the start of the include file, then sometimes I do not connect to the correct

[PHP-DB] Query table / results to an array

2008-02-28 Thread Ron Piggott
I need help populating an array based on the output of a mysql query. $reference_number is a value assigned by auto_increment $description is what I want the value of the array to be --- a few words in length $reference_number = mysql_result($search_result,$i,reference_number); $description =

Re: [PHP-DB] Query table / results to an array

2008-02-28 Thread Chris
Ron Piggott wrote: I need help populating an array based on the output of a mysql query. $reference_number is a value assigned by auto_increment $description is what I want the value of the array to be --- a few words in length $reference_number =

Re: [PHP-DB] Query table / results to an array

2008-02-28 Thread Chris
Ron Piggott wrote: This line of code while ($row = mysql_fetch_assoc($result)) { Gave me this error message: Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource I ran select reference, description from table in mySQL and it worked --- Any idea what caused