> I've been working with PHP/MySQL on Win NT and Win 2000 for a few weeks.
> I've now set up a Linux machine (Mandrake 8.1 on Dell laptop) and have
moved
> my files across.
>
> I use an include file which logs on to the MySQL server and then connects
to
> the database. It performs the login ok but not the select db part.
>
> I tried creating a db using a php script and then selecting it and got the
> same problem.
>
> I'm new on Linux so it might be something in the configuration which needs
> working on.
>
> Any suggestions?

Well, if you had posted some code, someone might have seen the error...  :(

Anyway, here is how i do it:

if($db = mysql_pconnect($dbhost, $dbuser, $dbpasswd)){
mysql_select_db($dbname, $db);
} else {
echo mysql_error();
exit;
}

------------------------------------------------------------------------
Greg Donald - http://destiney.com/
http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/
------------------------------------------------------------------------


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to