2022-11-22 11:31:31 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace OCA\Memories\Db;
|
|
|
|
|
|
|
|
trait TimelineQueryLivePhoto
|
|
|
|
{
|
|
|
|
public function getLivePhoto(int $fileid)
|
|
|
|
{
|
|
|
|
$qb = $this->connection->getQueryBuilder();
|
|
|
|
$qb->select('lp.fileid', 'lp.liveid')
|
|
|
|
->from('memories', 'm')
|
|
|
|
->where($qb->expr()->eq('m.fileid', $qb->createNamedParameter($fileid)))
|
|
|
|
->innerJoin('m', 'memories_livephoto', 'lp', $qb->expr()->andX(
|
|
|
|
$qb->expr()->eq('lp.liveid', 'm.liveid'),
|
|
|
|
))
|
|
|
|
;
|
|
|
|
|
2023-03-24 01:12:39 +00:00
|
|
|
return $qb->executeQuery()->fetch();
|
2022-11-22 11:31:31 +00:00
|
|
|
}
|
|
|
|
}
|