in reply to DBI gives out wrong data

Isolate the problem. Create a test script that does only the following:
  1. connect to the database
  2. run that SQL statement
  3. pull the data

If that works, then the problem isn't in that code. Plus, what's going on with the Mason stuff in your trace?


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^2: DBI gives out wrong data
by robscov (Initiate) on Jun 27, 2005 at 13:24 UTC
    Cheers, Works fine outside its Mason component ... grrrrr ... some under-the-hood stuff ... grrrr ...
    -> fetchrow_hashref for DBD::mysql::st (DBI::st=HASH(0x8184434)~0x +8184428) 1 -> FETCH for DBD::mysql::st (DBI::st=HASH(0x8184428)~INNER 'NAME') -> dbd_st_FETCH_attrib for 0804d2a8, key NAME 1 <- FETCH= [ 'i_preference_desc' 'name' 'range_value' 'value' 'def_ +value' ] at test.pl line 20 1 -> fetch for DBD::mysql::st (DBI::st=HASH(0x8184428)~INNER) -> dbd_st_fetch for 0804d2a8, chopblanks 0 Storing row 0 (10) in 08184608 Storing row 1 (ext_email_action) in 081845fc Storing row 2 (none, forward, notify, copy) in 081845f0 Storing row 3 (forward) in 081845e4 Storing row 4 (none) in 08184590 <- dbd_st_fetch, 5 cols 1 <- fetch= [ '10' 'ext_email_action' 'none, forward, notify, copy' +'forward' 'none' ] row11 at test.pl line 20 <- fetchrow_hashref= HASH(0x81854e8)5keys row11 at test.pl line 20 forward at ./test.pl line 20.
      This definitely seems to be a Mason, or possibly mod_perl bug.
        D'oh .... finally tracked it down to the dbhandle being screwed in a mason component I was calling ... spent several hours looking in totally the wrong place ... Thanks for your help, guys! Rob