Click here to register.
      
Sprechen Sie WebGUI? Parlez vous WebGUI? Se habla WebGUI? Spreekt u WebGUI?

Do you speak WebGUI? Please help us translate WebGUI into your language.



     Web Design, Templates, and Themes > listing all pdfs

listing all pdfs

User elnino
Date 2/19/2008 3:36 pm
Views 1155
Rating -5    Rate [
|
]
Previous · Next
User Message
elnino

I have a query that I think should list all the pdfs:

select asset.assetId, asset.parentId, assetData.url,assetData.title,assetData.menuTitle,assetData.assetSize, assetData.revisionDate from asset inner join FileAsset on asset.assetId = FileAsset.assetId inner join assetData on asset.assetId = assetData.assetId where FileAsset.filename like '%.pdf' and asset.state = 'published' and assetData.groupIdView = 7

1) how do I modify this to list all pdfs from a specific starting point?

2) how do I translate the assetSize to Kb? Is it in bytes right now?

Thanks!

 

--- (Edited on 2/19/2008 3:36 pm [GMT-0600] by elnino) ---



Back to Top
Rate [
|
]
 
 
colink

Asset size includes the size of db entry for the Asset, too.  Things like url, title, lineage, etc.

If you want to start at a certain point, you'll need to consider the Asset's lineage entry. 

--- (Edited on 2/19/2008 4:06 pm [GMT-0600] by colink) ---



Back to Top
Rate [
|
]
 
 
elnino

thank you colink.

So, how would I calculate the actual size of the file if the assetsize field includes the file size and the db record size? Or did I misunderstand you? Is the value stored in assetsize in bytes?

Ok. I read up on the lineage stuff Ithink I know what to do. Nice WIKI whoever wrote it.

--- (Edited on 2/26/2008 2:06 pm [GMT-0600] by elnino) ---



Back to Top
Rate [
|
]
 
 
elnino

Hello. My query is returning PDFs that are in a uncommitted version tag. Is there a way to filter them out?

 

select distinct assetData.url, assetData.menutitle as myfilename, round(assetData.assetSize/1024) as mykB, FROM_UNIXTIME(assetData.revisionDate, '%c/%e/%Y %l:%i %p') as mydate
from asset
inner join FileAsset on asset.assetId = FileAsset.assetId
inner join assetData on asset.assetId = assetData.assetId
where left(asset.lineage,length(?)) = ?
and assetData.url like '%.pdf'
and asset.className = 'WebGUI::Asset::File'
and FileAsset.filename like '%.pdf'
and assetData.groupIdView = 7
and asset.state = 'published'
and
  assetData.revisionDate =
    (SELECT
      MAX(maxassetData.revisionDate)
     FROM assetData as maxassetData
     WHERE assetData.assetId=maxassetData.assetId)
order by assetData.menutitle

--- (Edited on 3/13/2008 10:13 pm [GMT-0500] by elnino) ---



Back to Top
Rate [
|
]
 
 
elnino
never mind. Need to lok at status = 'aproved"

--- (Edited on 3/13/2008 11:50 pm [GMT-0500] by elnino) ---



Back to Top
Rate [
|
]
 
 

shows by JT - Mon @ 05:16pm

Glad to be here by titlandata - Mon @ 04:22pm

Re: Partner for Featu Document Repository by JT - Mon @ 04:21pm

User Registration and update page by aewhale - Mon @ 03:56pm

Re: Partner for Feature: Document Repository by sduensin - Mon @ 03:35pm

Re: Partner for Featu Document Repository by JT - Mon @ 03:26pm

Re: Glad to be here by sduensin - Mon @ 02:26pm

Re: Partner for Feature: Document Repository by sduensin - Mon @ 02:14pm

Re: is there a an audio/video gallery wobject? by fdillon - Mon @ 02:04pm

Re: Security on files ? by knowmad - Mon @ 01:55pm

Form not working. Help! by pvanthony - Mon @ 12:01pm

Security on files ? by dwittenberg - Mon @ 11:47am

Re: Partner for Feature: Document Repository by alphamega - Mon @ 11:08am