Re: Is select_db necessary?

From: Date: Wed, 12 Aug 2009 12:25:41 +0000
Subject: Re: Is select_db necessary?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-296688@lists.php.net to get a copy of this message
mysql_select_db is not necessary but it does make writing queries easier since you don't have to specify which database in each query. Take care, Floyd On Aug 11, 2009, at 11:23 PM, Allen McCabe wrote:
I have seen different scripts for working with SQL, and most follow the same method with on difference. Variables are defined (host, password, etc.) mysql_connect command //then, the difference mysql_select_db command //back to common $sql = "SELECT ... " $result = mysql_query($ql) Is the database selection necessary, or is that implied with a SELECT or other SQL command?


« previous php.general (#296688) next »