Re: Lost connection to mysql db. Plus I could use some help

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

 



> Good morning. In Windows XP, MYSQL, PHP and using the following code
> snippet:
> 
> <?
> $conn = mysql_connect('localhost', 'odbc', '') or die ("Can't Connect To
> Database");
> $db = mysql_select_db("wwpbt", "$conn") or die ("Can't Select Database");

Change the above line to the following for a more useful error message from mysql:
$db = mysql_select_db("wwpbt", "$conn") or die ("Can't Select Database". mysql_error());

> $echo ("Congratulations - you connected to MySQL");
> ?>


This message was sent through MyMail http://www.mymail.com.au

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux