Greenhalgh David wrote: > ... > Second question. If I use the following: > > my $query="CURDATE()"; > my $sth->prepare($query); > $sth->execute; > > I understand that $sth now just contains the reference to the result > of the query. Where is the value of the query (which should be today's > date.) It doesn't seem to be in $_.
I don't know MySQL, but that doesn't appear to be a valid query. Queries start with SELECT. Anyway, on a query that returns rows, you fetch the rows with one of the fetch methods of the statement handle. Something like: my ($result) = $sth->fetchrow_array; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]