Re: (mysql to postgresql) in php functions

From: Ericson Smith <eric(at)did-it(dot)com>
To: "Camarao, Wagner (v)" <Wagner(dot)Camarao(at)bowneglobal(dot)com(dot)br>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: (mysql to postgresql) in php functions
Date: 2003-04-11 18:15:24
Message-ID: 1050084924.30589.33.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

There is no need to select a db after connecting to it in Pg. Remember
that the database is in the connection string.

The function calls are ever so slightly different between the two, that
it would be a good idea to look it over very well before going ahead.
Some good pointers are here:
http://www.php.net/manual/en/function.pg-connect.php
http://www.php.net/manual/en/function.pg-fetch-array.php

- Ericson Smith
eric(at)did-it(dot)com
http://www.did-it.com

On Thu, 2003-04-10 at 16:54, Camarao, Wagner (v) wrote:
> Hi. I am migrating a site database from MySQL to PostgreSQL.
>
> First I just changed the function calls and then I got the error
> message that PHP was not compiled with PostgreSQL support.
>
> Ok, so I recompiled the PHP as necessary and now the problem is that
> there was a function being used, called mysql_select_db();, that there is
> none to use with PostgreSQL instead of it.
>
> I really dont know if it is necessary to use the select_db function
> after the connection to the database. But I think so, because when I try to
> execute a query (without running the select_db function) I get the error
> message:
>
> "Fatal error: Call to undefined function: pg_query() in
> /path/file.php on line 123"
>
> Anybody can help me? Although this is not a php mail list?! :-)
>
> Tks,
> Wagner
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
--
Ericson Smith <eric(at)did-it(dot)com>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message mallah 2003-04-11 18:19:12 Re: Case sensitive order by
Previous Message Molly Gibson 2003-04-11 18:06:28 Need Clarification re md5 and pg_shadow files.