fbsd_user wrote:
mysql_connect("localhost","root") or die("Unable to connect to MySQL server");

  $err mysql_connect("localhost","root");
  if ($err != 0) {

Under what conditions will the die clause be taken.

What is in $err  if there is a error?

Are these 2 statements basically doing the same thing?
mysql_connect() returns a PHP connection resource on success, FALSE on failure; or ... executes if the func returns FALSE. To see what the error is, try ... or exit( mysql_error() ). Best practice is to build your own generic error handler around this functionality.

PB


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 3/10/2006


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to