Lines 52-66
sub new {
Link Here
|
52 |
# Find the earliest timestamp in the biblio table. If this table is empty, undef |
52 |
# Find the earliest timestamp in the biblio table. If this table is empty, undef |
53 |
# will be returned and we will report the fallback 0001-01-01. |
53 |
# will be returned and we will report the fallback 0001-01-01. |
54 |
sub _get_earliest_datestamp { |
54 |
sub _get_earliest_datestamp { |
55 |
|
|
|
56 |
my $dbh = C4::Context->dbh; |
55 |
my $dbh = C4::Context->dbh; |
57 |
|
56 |
my ( $earliest ) = $dbh->selectrow_array("SELECT DATE(MIN(timestamp)) AS earliest FROM biblio" ); |
58 |
my $order_sth = $dbh->prepare( "SELECT DATE(MIN(timestamp)) AS earliest FROM biblio" ); |
57 |
return $earliest |
59 |
$order_sth->execute(); |
|
|
60 |
my $res = $order_sth->fetchrow_hashref(); |
61 |
|
62 |
return $res->{'earliest'}; |
63 |
|
64 |
} |
58 |
} |
65 |
|
59 |
|
66 |
1; |
60 |
1; |
67 |
- |
|
|