I've just installed the DBI and Msql-Mysql modules that I got from the
www.mysql.com official perl API page, but I am having problems in
working with the basic queries.

See the script below:
______________________________
#! /usr/bin/perl -w

use Mysql;

$dbh = Mysql->connect('ads', 'test', '', '');
$sth = $dbh->listtables;
print "$sth\n";
@arr = $dbh->query('select * from pet');
print "@arr\n";
$sth = $dbh->listfields('pet');
print "$sth\n";

_____________________

pet
Mysql::Statement=HASH(0x80fed3c)
Mysql::Statement=HASH(0x80fee5c)


__________________________

So, the listtables command is working, but I cannot get the other two ones
(the querry and the listfields) work too.

Can somebody tell me what am I doing wrong ? How am I supposed to query
Mysql (select, insert, delete, etc) ?


Thanks in advance.
Nick...
____________________________________________________________________________
Go to my main website http://terra.vl.ro/nick/ and find out more about me.
I am seeking a job ! See http://terra.vl.ro/nick/resume.html to read
about my skills and experience.
MAY ALL OUR CHOICES BE GOOD ONES !
_____________________________________________________________________________




Reply via email to