I just recently switched to IIS from Apache since IIS came with Windows XP
and I just love Microsoft. I installed PHP and MySQL with no problems but
when I tried accessing a table, I got this error:

No Database Selected

In my script, I have this:

$hostname_default = "localhost";
$database_default = "check";
$username_default = "root";
$password_default = " **taken out for known reasons** ";
$default = mysql_pconnect($hostname_default, $username_default,
$password_default) or die(mysql_error());
mysql_select_db($database_default, $default);
$query_update = "SELECT * FROM updates ORDER BY `date` DESC LIMIT 1";
$update = mysql_query($query_update, $default) or die(mysql_error());
$row_update = mysql_fetch_assoc($update);
$totalRows_update = mysql_num_rows($update);

I don't see where it's gone wrong! My database name is check and phpMyAdmin
can get to it just fine. Also, how can I set it up so MySQL allows the user
name root and no password acessable through localhost? I accidently changed
it to only allow username root, with password...

Stephen Craton

"What is a dreamer that can not persevere?" -- http://www.melchior.us

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

Reply via email to