Re: [PHP] Problem with fetching values...

2008-12-29 Thread chris smith
> So, PostgreSQL catch the array by "name" > >pg_fetch_array($db_query, null, PGSQL_ASSOC) > > and MySQL use the "position" > >mysql_fetch_array($db_query, MYSQL_NUM) Why? http://www.php.net/mysql_fetch_array Use MYSQL_ASSOC as the 2nd param, or leave it out and by default it uses BOTH.

Re: [PHP] Problem with fetching values...

2008-12-28 Thread Nathan Nobbe
On Sun, Dec 28, 2008 at 10:41 AM, Michelle Konzack < linux4miche...@tamay-dogan.net> wrote: > Hello, > > I have to code a compatibility layer under PHP5 for PostgreSQl and > MySQL, which mean, I have to code something like db_query() which then > can be used with mysql_query() and pg_query

[PHP] Problem with fetching values...

2008-12-28 Thread Michelle Konzack
Hello, I have to code a compatibility layer under PHP5 for PostgreSQl and MySQL, which mean, I have to code something like db_query() which then can be used with mysql_query() and pg_query(). But now I have hit an weird error, since in PostgreSQL it is wotking but in MySQL it get the righ