Re: mysql to postgres migration blues...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 23 Sep 2004 12:23:32 -0700, Andrew Kreps <andrew.kreps@xxxxxxxxx> wrote:
> On Thu, 23 Sep 2004 20:51:52 +0200, Antoine <melser.anton@xxxxxxxxx> wrote:
> > declaring it as global didn't seem to work -
> >
> > global $link;
> >     /* Connect to database */
> >     $link = pg_connect("dbname=movies host=localhost user=anton
> > password=password")
> 
> The global keyword works a little bit differently in PHP.  You need to
> inform your function that your variable is global, as opposed to
> declaring it as global outside the function.  Like:
> 
> $link = "database connection"
> 
> function processData () {
>     global $link;
>     ...

Like i said, I'll get there ;-). Cheers! I hope you folks don't mind
answering some rather basic questions... I am going to be starting
some serious development soon and promise to search the docs first
:-).
I have just followed up on the suggestion of pear and it looks like a
winner. That may mean a change of mailing list but all good for the
moment.
Cheers
Antoine

-- 
G System, The Evolving GUniverse - http://www.g-system.at

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux