Click here to register.
      
irc://irc.freenode.net#webgui

iPhoneGuy: WebGUI is a pile of crap.
rizen: If WebGUI is such a pile of crap, why do you use it?
iPhoneGuy: Because it's the best pile of crap out there.

If this is what people who hate us are saying, imagine what people who love us will say. Come join us on IRC.


     Web Design, Templates, and Themes > listing all pdfs

listing all pdfs

User elnino
Date 2/19/2008 3:36 pm
Views 1031
Rating -4    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 [
|
]
 
 

Smoketest For nightly_2008-08-30 by Visitor - Sat @ 01:45am

Re: Config File Changes by pwrightson - Fri @ 04:07pm

Re: IRC Logs by koen - Fri @ 02:08pm

Re: IRC Logs by patspam - Fri @ 02:01pm

Re: IRC Logs by koen - Fri @ 01:42pm

Re: How do I find al my submitted RFE's? by bartjol - Fri @ 01:39pm

Re: IRC Logs by kristi - Fri @ 01:27pm

Re: LastModified question by perlDreamer - Fri @ 12:57pm

Re: How do I find al my submitted RFE's? by bartjol - Fri @ 12:11pm

How do I find al my submitted RFE's? by koen - Fri @ 11:23am

Re: IRC Logs by koen - Fri @ 11:20am

IRC Logs by martink - Fri @ 10:51am

Re: cleaning out the wiki by koen - Fri @ 10:44am

Re: shop in 7.5.21 by kristi - Fri @ 09:03am