in reply to Re: SELECT COUNT and DBI: rows
in thread SELECT COUNT and DBI: rows

OK, I checked it out, AS is valid, but didn't it used to be not-valid syntax? I remember having to use MySQL without the AS after I swtiched from Oracle (a few years ago).

As for as  $numrows = $sth->rows; not working, it does work, always has worked with MySQL for selects (and I use it in Oracle), the DBI docs suggest you don't use it for compatabilty across different drivers. And yes I do understand it only returns the current row count affected, not the rows in the table (duh)

Replies are listed 'Best First'.
Re: Re: Re: SELECT COUNT and DBI: rows
by dws (Chancellor) on Sep 28, 2003 at 21:15 UTC
    ... but didn't it used to be not-valid syntax? I remember having to use MySQL without the AS after I swtiched from Oracle (a few years ago).

    A "few years ago" in internet time is a lifetime. You can save yourself embarrassment by checking current docs before making a "you can't do that" statement, especially on stuff you haven't used for a few years.