Bug 17778: Simplify fetch date
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
ff711c48cf
commit
c69e6faa98
1 changed files with 2 additions and 8 deletions
|
@ -52,15 +52,9 @@ sub new {
|
|||
# Find the earliest timestamp in the biblio table. If this table is empty, undef
|
||||
# will be returned and we will report the fallback 0001-01-01.
|
||||
sub _get_earliest_datestamp {
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
|
||||
my $order_sth = $dbh->prepare( "SELECT DATE(MIN(timestamp)) AS earliest FROM biblio" );
|
||||
$order_sth->execute();
|
||||
my $res = $order_sth->fetchrow_hashref();
|
||||
|
||||
return $res->{'earliest'};
|
||||
|
||||
my ( $earliest ) = $dbh->selectrow_array("SELECT DATE(MIN(timestamp)) AS earliest FROM biblio" );
|
||||
return $earliest
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
Loading…
Reference in a new issue