Re: what does $dbh->execute return for a select?




On 19-May-2006 Tim Bunce wrote:
On Fri, May 19, 2006 at 07:24:13PM +0100, Martin J. Evans wrote:

but I'm doing a select * from table and getting back a true value
which is 1. I thought for a successful select, execute would return
0E0 (which is true) but not 1. I was hoping to use true but not
0E0 to identify a non-select statement that affected rows.

You can use $sth->{NUM_OF_FIELDS} to tell if it's a SELECT statement.

Tim.

Thanks and sorry - what comes from working too late.
I've made that change but I still don't think execute is returning what the
documentation suggests it should.

Martin
--
Martin J. Evans
Easysoft Ltd, UK
http://www.easysoft.com

.



Relevant Pages

  • Re: How to call DBD::Oracles dbms_output_get from within a DBIx
    ... Tim Bunce wrote: ... which is usually (from applications) called like this: ... dbms_output_get does create a new statement, prepare and execute it and it appears when execute is called it ends up back in my ... Martin J. Evans ...
    (perl.dbi.users)
  • Re: $sth->{NAME} doesnt work
    ... > Tim Bunce wrote: ... Undef could mean any of those and it's not ... > need to execute() first. ... > Or consider porting a program from one DBD driver to another. ...
    (perl.dbi.users)
  • Re: Code Execution
    ... Your right about it running successfully - it's successful thousands of ... The code to execute the document is in a .BAT file that does a WINWORD.EXE ... Thanks for yor help. ... Jean-Guy Marcil - Word MVP ...
    (microsoft.public.word.vba.general)
  • Re: Adding/removing software
    ... Enquire, plan and execute. ... Please tell the newsgroup how any ... removal was successful. ...
    (microsoft.public.windowsxp.general)
  • Re: Why wont this work ?
    ... whether the unregistration was successful. ... function was able to execute the program at all. ... The trick is to use LoadLibrary, GetProcAddress and then call the AX ...
    (alt.comp.lang.borland-delphi)