note 6580 deleted from mysql_select_db by ronabop

From: Date: Wed, 23 Aug 2000 10:00:33 +0000
Subject: note 6580 deleted from mysql_select_db by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-2990@lists.php.net to get a copy of this message
Apologies, I mis-typed one variable, it should look like this: function db_connect($host = "localhost", $user = "myuser", $password = "pass") { global $link; $db = mysql_connect($host,$user,$password); $link = mysql_select_db($database = "mydb",$db); } function db_query($sql) { global $result; $result = mysql_query($sql,$link); if (mysql_errno()!=0) { echo "sql in "$sql"<br>n"; echo "error: ".mysql_error()."<BR>"; } }

« previous php.notes (#2990) next »