tag:help-archives.hannonhill.com,2010-02-09:/discussions/how-do-i/113-get-count-of-pages-filesCascade CMS: Discussion 2013-07-16T18:03:12Ztag:help-archives.hannonhill.com,2010-02-09:Comment/25322282010-08-10T20:07:03Z2010-08-10T20:07:05ZGet count of pages, files<div><p>Is there any way to get a count of the number of Pages contained in the database?</p>
<p>Similarly, is there any way to get a count of the number of files?</p>
<p>Thanks!<br />
Jon</p></div>whitenjgtag:help-archives.hannonhill.com,2010-02-09:Comment/25322282010-08-11T15:45:02Z2010-08-11T15:45:02ZGet count of pages, files<div><p>Hi Jon,</p>
<p>There is no way to do this from the interface, but you should be able to do this with a query like:<br />
</p>
<pre><code>select count(*) from cxml_foldercontent
where assetType = 'PAG'
and isCurrentVersion = 1
and isRecycled = 0;</code></pre>
<p>This will give you the count of all pages (<em>not</em> including past versions and <em>not</em> including recycled pages).</p>
<p>You can execute the same query but change <strong>assetType</strong> to <strong>'FIL'</strong> to get the count for files.</p>
<p>Hope this helps!</p></div>Tim