Re: Create database with pdo_mysql

From: Date: Mon, 15 May 2006 23:18:16 +0000
Subject: Re: Create database with pdo_mysql
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-236233@lists.php.net to get a copy of this message
On Mon, May 15, 2006 7:18 am, Kevin Waterson wrote: > Is it possible to create a database with pdo_mysql? > $dbh = new PDO("mysql:host=$hostname;dbname=my_db", $username, > $password); > is sort of what it requires... is there some way to omit the dbname? If you can't elminate it, 'mysql' as a dbname= is gonna work on virtually every MySQL server. That's where the username/password tables live. 'Course, you may not be allowed to connect to that database with the login info you have... -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#236233) next »