Re: parse error with mysql_connect

From: Date: Sun, 24 Aug 2003 17:14:36 +0000
Subject: Re: parse error with mysql_connect
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-160595@lists.php.net to get a copy of this message
Hi, The prototype for mysql_connect is: resource mysql_connect ( [string server [, string username [, string password [, bool new_link [, int client_flags ]]]]] ) As you can see you get parse error because the fourth argument should be boolean, not string. Cheers, Catalin 35: // Initialize MySQL database 36: $h = mysql_connect('localhost','localhost',constant("mysql_user"),constant("mysql _password")); 37: mysql_select_db('mjec_mjecnet', $h);

« previous php.general (#160595) next »