in reply to Using placeholders in OFFSET clause of SELECT statement

I suggested you to enable the tracing on DBI handle during the misbehaviors happens,
$dbh->trace( 2 );
That will give you the clear idea about where to lay your hands.