This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes COUNT NUmber of folder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "COUNT NUmber of folder" Watch "COUNT NUmber of folder" New topic
Author

COUNT NUmber of folder

deepak carter
Ranch Hand

Joined: Feb 19, 2011
Posts: 165
Hi ,

Dont know whether this is the right place to ask this.

How to count number of folder.

There is a application in which docuemnt are placed inside a folder.There is one column in a database "isFolder" whcih cantell whether its a folder or not but there is no such separate table for folder.
Then how can we count number of folders.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19651
    
  18

SELECT * FROM <table> WHERE isFolder = 1 (true, or whatever your column type requires) will return you all folders, right? So SELECT COUNT(*) will return the number.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
deepak carter
Ranch Hand

Joined: Feb 19, 2011
Posts: 165
How to count the number of documents in a folder???
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

there is a field that says which folder a document belongs in, right? This sounds like parents and children in the same table. Can you post the real structure of the table?
 
Consider Paul's rocket mass heater.
 
subject: COUNT NUmber of folder
 
Similar Threads
initialization of variables type int as null
Resultset row count
count the total number of selected items in multilist select box
How do demo softwares expire?
to find the count of text files in a directory..please help..