prb_fix
This commit is contained in:
@@ -49,17 +49,18 @@ trait PRB_FileControl
|
|||||||
}
|
}
|
||||||
public function getHistory($params)
|
public function getHistory($params)
|
||||||
{
|
{
|
||||||
$query = "SELECT
|
$query = "SELECT distinct
|
||||||
[upload_ip]+' ('+[DESCRIPT]+')' as IP_Author
|
[upload_ip]+' ('+ip_u.[DESCRIPT]+')' as IP_Author
|
||||||
,[download_ip]+' ('+[DESCRIPT]+')'as IP_Client
|
,[download_ip]+' ('+ip_d.[DESCRIPT]+')'as IP_Client
|
||||||
,convert(varchar, [download_date],104)+' - '+convert(varchar, [download_date],108) as download_date
|
,convert(varchar, [download_date],104)+' - '+convert(varchar, [download_date],108) as download_date
|
||||||
FROM [Production].[dbo].[PRB_FileLog] fl
|
FROM [Production].[dbo].[PRB_FileLog] fl
|
||||||
inner join [Production].[dbo].[PRB_FileControl] fc
|
inner join [Production].[dbo].[PRB_FileControl] fc
|
||||||
on fl.file_id=fc.id
|
on fl.file_id=fc.id
|
||||||
left join [SITE].[dbo].[Police_IP] ip
|
left join [SITE].[dbo].[Police_IP] ip_d
|
||||||
on fl.download_ip=ip.IP_ADDR
|
on fl.download_ip=ip_d.IP_ADDR
|
||||||
WHERE CAST([download_date] as DATE)='".$params['data']['date']."'
|
left join [SITE].[dbo].[Police_IP] ip_u
|
||||||
and file_id='".$params['data']['id']."'
|
on fc.upload_ip=ip_u.IP_ADDR
|
||||||
|
WHERE file_id='".$params['data']['id']."'
|
||||||
order by download_date desc";
|
order by download_date desc";
|
||||||
select($query);
|
select($query);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user