in reply to Re^2: NET:MySQL database connection error -- (Using password: NO) at MySQL_queryDB.pl
in thread NET:MySQL database connection error -- (Using password: NO) at MySQL_queryDB.pl

Hmm, I don't have time to look any further at Net::MySQL at the momemnt, have you considered using DBD::MySQL as mentioned in the MySQL documentation?

Martin

  • Comment on Re^3: NET:MySQL database connection error -- (Using password: NO) at MySQL_queryDB.pl

Replies are listed 'Best First'.
Re^4: NET:MySQL database connection error -- (Using password: NO) at MySQL_queryDB.pl
by sqspat (Acolyte) on Sep 24, 2009 at 14:01 UTC
    got it working with DBI.... the only thing is if I want to pull back a table from the Database ... it is returned in the form of DBI::st=HASH(0xa0dc0c0) ... Is there anyway of pulling back the Table contents in a more readable format??

      You can get result as array using one of the following functions:

      $ary_ref = $dbh->selectall_arrayref($statement); $hash_ref = $dbh->selectall_hashref($statement, $key_field);
      Consider to read DBI documentation. Also if you provide us with your code then asking question it would be simpler to give you useful answer.