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



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.
.



Relevant Pages

  • 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)
  • Return Code from Execute Process Task
    ... I have created a DTS package. ... value if it was successful or not. ... In execute process task a can set a return code for success. ... want to return a failure code an continue the dts package? ...
    (microsoft.public.sqlserver.dts)
  • Re: what does $dbh->execute return for a select?
    ... On 19-May-2006 Tim Bunce wrote: ... I thought for a successful select, ... I've made that change but I still don't think execute is returning what the ... Martin J. Evans ...
    (perl.dbi.users)