Re: use data-ba_se

From: Date: Mon, 12 Aug 2002 04:56:18 +0000
Subject: Re: use data-ba_se
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-112095@lists.php.net to get a copy of this message
In article <20020809133953.GK31634@foghorn.bartels-schoene.de>, list+php- general@b-a-l-u.de says... > Hi, > > I just noticed a little problem(?) while using databases. > > Some time ago I wrote myself a little class that made it easier to > handly my mysql-tasks. The class connected to a database and used a > query like "use $database" to switch to the given database. > > This worked without a problem just as in the command-line tool "mysql", > today however I had a database called like "data-ba_se". > > "use"ing it gave me a note "cannot use database data-ba_se" as result. > However it worked in the command-line mysql and it works using > mysql_select_db(). Login, Database and password were checked for typo's > of course. > > PHP is 4.1.2, default woody-package. > > Any idea what can be the reason for this? > > Balu > The underscore is a mysql wildcard for a single character; it may be that mysql is attempting to treat it as a wildcard rather than a literal in the circumstances in which you are using it. Cheers -- David Robley Temporary Kiwi! Quod subigo farinam

« previous php.general (#112095) next »