View Single Post
Old 06-22-2004, 11:16 AM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,505
sde is on a distinguished road
you need to select a db after you connect: http://www.php.net/manual/en/functio...-select-db.php
PHP Code:
<?php

$link 
mysql_connect('localhost''mysql_user''mysql_password');
if (!
$link) {
   die(
'Not connected : ' mysql_error());
}

// make foo the current db
$db_selected mysql_select_db('foo'$link);
if (!
$db_selected) {
   die (
'Can\'t use foo : ' mysql_error());
}
?>
__________________
Mike
sde is offline   Reply With Quote