Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Now, looking at your actual output, I see that indeed, date_time cannot be NULL because you order by it. So it must be a bug or a problem with either DBIx::Class or your database driver. I don't know if it's easy to get at the unsullied result set as returned by DBI, but maybe you can determine the culprit by doing:

my $dbh = DBI->connect(..., {RaiseError => 1}); my $sth = $dbh->prepare(<<SQL); SELECT me.id, me.name, me.date_time, me.status_code, me.time_taken + FROM tests me WHERE ( ( ( date_time <= ? AND date_time >= ? ) AND name = ? ) ) ORDER BY date_time SQL $sth->execute('2009-06-24 23:59:59', '2009-06-24 00:00:00', 'ART_CRV') +; my $res = $sth->fetchall_arrayref(); print Dumper($res);

If you find any undef in there, the problem is with your DBD. If you don't find any undef there, the problem is likely in your DBIx::Class stack somewhere.


In reply to Re^8: DBIC intermittently returning rows missing date_time value by Corion
in thread DBIC intermittently returning rows missing date_time value by reasonablekeith

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2023-03-30 11:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (74 votes). Check out past polls.

    Notices?