Re: newbie having problem

From: Date: Wed, 05 Sep 2001 06:49:21 +0000
Subject: Re: newbie having problem
References: 1 2 3 4  Groups: php.db 
Request: Send a blank email to php-db+get-12155@lists.php.net to get a copy of this message
Oops, I forgot to say that I can handle this db as a client on the command line and it shows up under mysqlshow. George ----- Original Message ----- From: George Pitcher <fmdev@yahoo.co.uk> To: Jason Wong <phplist@gremlins.com.hk>; <php-db@lists.php.net> Sent: Wednesday, September 05, 2001 7:46 AM Subject: Re: [PHP-DB] newbie having problem > Jason, > > Having tried your suggestion, I see that I can connect to the server but > cannot select the db. > > Where do I go from here? > > George > ----- Original Message ----- > From: Jason Wong <phplist@gremlins.com.hk> > To: <php-db@lists.php.net> > Sent: Monday, September 03, 2001 4:39 PM > Subject: Re: [PHP-DB] newbie having problem > > > > > > ----- Original Message ----- > > From: George Pitcher <fmdev@yahoo.co.uk> > > To: Torgil Zechel <torgil@problem.se>; <php-db@lists.php.net> > > Sent: Monday, September 03, 2001 11:19 PM > > Subject: Re: [PHP-DB] newbie having problem > > > > > > > > if( $result == FALSE ) > > > > { > > > > echo mysql_error(); > > > > } > > > Yes - progress - its telling me that no database was selected. > > > > > > My code again: > > > > > <?php > > > > > mysql_connect ('pingu','root@localhost',''); > > > > > mysql_select_db ('Bizplanes'); > > > > > if ($Serial == "") > > > > > {$Serial = '%';} > > > > > if ($Type == "") > > > > > {$Type = '%';} > > > > > if ($Con == "") > > > > > {$Con = '%';} > > > > > $result=mysql_query ("SELECT * FROM biz WHERE > > > > > ID LIKE '%$Serial%' AND > > > > > Type LIKE '%$Type%' > > > > > Con LIKE '%$Con%' > > > > > ORDER BY ID"); > > > > > ?> > > > > You haven't specified a password when connecting to the server -- does it > > require one? > > > > Have you tried the code as per manual: > > > > $link = mysql_connect("mysql_host", "mysql_login", > > "mysql_password") > > or die ("Could not connect"); > > print ("Connected successfully"); > > mysql_select_db ("my_database") > > or die ("Could not select database"); > > > > to ensure that you *are* able to connect to the server and also *select* > the > > database? > > > > hth > > -- > > Jason Wong > > Gremlins Associates > > www.gremlins.com.hk > > Tel: +852-2573-5033 > > Fax: +852-2573-5851 > > > > > > > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > > For additional commands, e-mail: php-db-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com

« previous php.db (#12155) next »