Re: [PHP] mysql_select_db problem

2002-06-03 Thread Philip Olson
oops, i forgot a @ for mysql_connect() but oh well, you get the point :) Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mysql_select_db problem

2002-06-03 Thread Philip Olson
> The following code always returns the "Couldn't select > database" error. > $db_name="mydb"; > $table_name="my_table"; > $connection = @mysql_connect("localhost", "user", "password") or die > ("Couldn't connect."); > $db = @mysql_select_db($db_name) or die ("Couldn't select database"); > ?>

Re: [PHP] mysql_select_db problem

2002-06-03 Thread Peter Goggin
uot;stamps") or die("Could not select database"); This works. Regards Peter Goggin - Original Message - From: "PossumPal" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 03, 2002 4:40 AM Subject: [PHP] mysql_select_db problem Hi, I

Re: [PHP] mysql_select_db problem

2002-06-02 Thread Nathan
ouldn't hurt to try :-) Cheers, # Nathan - Original Message - From: "PossumPal" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, June 02, 2002 12:40 PM Subject: [PHP] mysql_select_db problem Hi, I'm a newbie, so please have mercy on my silliness

[PHP] mysql_select_db problem

2002-06-02 Thread PossumPal
Hi, I'm a newbie, so please have mercy on my silliness... I've checked my formats, and can't seem to understand why I can connect to the db, but not select the db that I want to use. The following code always returns the "Couldn't select database" error. If I use the mysql monitor, I can s

Re: [PHP] mysql_select_db() problem

2002-02-10 Thread DL Neil
> > What do you get if you use error checking? > > Well, that seems to be it, I'm getting 'Access deneid to user > '@localhost'. > > I'm talking to a guy on the mysql list, apparently it is a > phenomememememememmemonmmm that when you GRANT ALL using wildcards it > tends to grant all on * exce

Re: [PHP] mysql_select_db() problem

2002-02-09 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Lars Torben Wilson declared > I take it that the connection worked fine? (Yeah, dumb question, but you > never know.) Yeah, all is well as far as connections concerned. > What do you get if you use error checking? Well, that seems t

Re: [PHP] mysql_select_db() problem

2002-02-09 Thread Lars Torben Wilson
On Sat, 2002-02-09 at 12:24, Nick Wilson wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi all, > I just can't see what could possibly be wrong with my php here: > > $sel_db=mysql_select_db("mydb") or die > ("could not get the bugger"); > exit; > > I can

Re: [PHP] mysql_select_db() problem

2002-02-09 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Jeff Sheltren declared > It may be having a problem because you are not specifying which > connection to use. > > perhaps try something like this: > > if(!$db = @mysql_connect("$dbhost", "$dbuser", "$dbpasswd")) > die("An Error

Re: [PHP] mysql_select_db() problem

2002-02-09 Thread Jeff Sheltren
It may be having a problem because you are not specifying which connection to use. perhaps try something like this: if(!$db = @mysql_connect("$dbhost", "$dbuser", "$dbpasswd")) die("An Error Occured. Unable to connect to the database."); if(!@mysql_select_db("$dbname",$db)) die("An Er

[PHP] mysql_select_db() problem

2002-02-09 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I just can't see what could possibly be wrong with my php here: $sel_db=mysql_select_db("mydb") or die ("could not get the bugger"); exit; I can 'USE mydb' just fine from the command line so what's the problem?