Just out of interest, what's the standard/best/tried&tested method for
handling errors in relation to connecting to DB's?  i.e. how to check that
the connection was a success, and if not then display why.

any pointers appreciated.

 .b

> -----Original Message-----
> From: Mike Eheler [mailto:[EMAIL PROTECTED]]
> Sent: 03 May 2002 02:28
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: PHP with MySQL
>
>
> Typically it's done like:
>
> $db = mysql_connect('localhost','username','password');
>
> The MySQL database detects what host you're connecting from, and appends
> that to your username. I'm not sure if it's possible to specify an
> alternate host.
>
> So if both PHP and MySQL are on the same machine, and you connect to the
> MySQL server as 'username', MySQL will see you as 'username@localhost'.
>
> Mike
>
>
> Paras Mukadam wrote:
> > Hi Gurus,
> > one MySQL - PHP query : while granting permissions to particular user in
> > MySQL, the administrator has to give username@machine_address
> !! Then how
> > can we connect to MySQL through PHP only by passing "username"
> as one of the
> > arguments to mysql_connect() ?
> >
> > Thanks.
> > Paras.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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

Reply via email to