|
Lines 12-28
return {
Link Here
|
| 12 |
q{ |
12 |
q{ |
| 13 |
SELECT borrowernumber |
13 |
SELECT borrowernumber |
| 14 |
FROM borrowers |
14 |
FROM borrowers |
| 15 |
WHERE updated_on = '0000-00-00 00:00:00' |
15 |
WHERE CAST(updated_on AS CHAR(19)) = '0000-00-00 00:00:00' |
| 16 |
} |
16 |
} |
| 17 |
); |
17 |
); |
| 18 |
$sth->execute; |
18 |
$sth->execute; |
| 19 |
my $results = $sth->fetchall_arrayref( {} ); |
19 |
my $results = $sth->fetchall_arrayref( {} ); |
| 20 |
|
|
|
| 21 |
if (@$results) { |
20 |
if (@$results) { |
| 22 |
sanitize_zero_date( 'borrowers', 'updated_on' ); |
21 |
sanitize_zero_date( 'borrowers', 'updated_on' ); |
| 23 |
say_info( $out, "The following borrowers' updated_on has been sanitized: " |
22 |
say_info( $out, "The following borrowers' updated_on has been sanitized: " |
| 24 |
. join( ', ', map { $_->{borrowernumber} } @$results ) ); |
23 |
. join( ', ', map { $_->{borrowernumber} } @$results ) ); |
| 25 |
} |
24 |
} |
| 26 |
|
|
|
| 27 |
}, |
25 |
}, |
| 28 |
}; |
26 |
}; |
| 29 |
- |
|
|