Re: PHP Error

From: Date: Fri, 12 Oct 2001 10:33:26 +0000
Subject: Re: PHP Error
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-13290@lists.php.net to get a copy of this message
Viper1, To prevent cross-posting complaints, please see response on MySQL discussion list =dn ----- Original Message ----- From: "Dobromir Velev" <diadomraz@rambler.bg> To: <php-db@lists.php.net>; "Viper1" <viper1@mediaone.net> Sent: 12 October 2001 06:32 Subject: Re: [PHP-DB] PHP Error > Hi > Did you try to use > mysql_select_db("jobs",$db); > > HTH > Dobromir Velev > > > -----Original Message----- > From: Viper1 <viper1@mediaone.net> > To: php-db@lists.php.net <php-db@lists.php.net> > Date: Friday, October 12, 2001 5:11 AM > Subject: [PHP-DB] PHP Error > > > >Code from Index.phtml > > > ><? > > > >//if(getenv("REMOTE_ADDR") == "www.msn.com"){ header("Location: > >http://www.cnn.com"); } > > $db = mysql_connect("localhost", "login", "secret") or die > > ("Unable to > >connect to db"); > > mysql_select_db("jobs"); > > $return = mysql_query("select * from config"); > > $copy = mysql_fetch_array($return); > > mysql_close(); > >?> > > > >This is the errors: > > > >Warning: Supplied argument is not a valid MySQL result resource in > >C:\sites\jobs\8-01\docs\index.phtml on line 7 > > > > > > > > > > > >-- > >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 > > > > > > > -- > 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 > >

« previous php.db (#13290) next »