CURDATE() has to be selected
SELECT(CURDATE());
--- Bob Showalter <[EMAIL PROTECTED]>
wrote:
> 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]
> 


=====
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d s+:++ a C++ UL++ US+ P+++ L++ 
W+++ w PS PE t++ b+ G e r+++ z++++
------END GEEK CODE BLOCK------

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to