Re: PHP-MySQL connection for particular module

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

 



Because then the connection resource isn't stored in the $link variable and
you will be able to use the mysql functions without passing that variable to
each function.

On Wed, Jun 18, 2008 at 1:51 AM, Chris <dmagick@xxxxxxxxx> wrote:

>
> > It means that either your mysql conenction details are not correctly set
> or
> > the connection resource isn't accessible for your mysql functions. I
> suggest
> > you first try by replacing:
> >
> > $link = mysql_pconnect('localhost', 'root', 'testing');
> >
> > into:
> >
> > mysql_pconnect('localhost', 'root', 'testing');
>
> Why? How is that going to help fix the problem?
>
> Personally I'd say to *not* use persistent connections as it will cause
> you problems later.
>
> Use a normal connection:
>
> $link = mysql_connect($server, $user, $pass);
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>



-- 
Isaak Malik
Web Developer

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

  Powered by Linux