http://qs321.pair.com?node_id=165501


in reply to Problems with MySQL - "No Database Selected"

Add a "CONNECT whatever_your_database_is_named" and you should be ok.
Sounds like your dba didn't choose a default database, if that's possible in mysql...

not perl related, and minimally only database related... pick up a primer and enjoy.
update oops, chromatic's correct. Teach me to write a node while I'm in a cranky mood. mea culpa.
  • Comment on Re: Problems with MySQL - "No Database Selected"

Replies are listed 'Best First'.
Re: Re: Problems with MySQL - "No Database Selected"
by ninja-joe (Monk) on May 09, 2002 at 21:06 UTC
    I did this and it flagged an SQL syntax error: Did I add it to the right spot?
    $sth = $dbh->prepare("CONNECT default; SELECT section, content FROM we +bdata WHERE section=home")