add limit with depth

This commit is contained in:
wlx 2010-07-02 10:37:49 +00:00
parent 3f0a8e128a
commit 3b50a5d20c
1 changed files with 2 additions and 1 deletions

View File

@ -26,9 +26,10 @@ class FilelistController extends Zend_Controller_Action {
$uuid=$this->_request->getParam('uuid');
$getUrl=$this->_request->getParam('subpath');
$subPath=urldecode($getUrl);
$depth=substr_count($subPath,'/');
$filelist=new FilelistTable();
$adapter=$filelist->getAdapter();
$db=$adapter->query("select file_name,file_path,id,meta_uuid from westdc_fileinfo where meta_uuid='$uuid' and file_name ilike '$subpath%' order by isdir desc,file_name");
$db=$adapter->query("select file_name,file_path,id,meta_uuid from westdc_fileinfo where meta_uuid='$uuid' and depth='$depth' and file_name ilike '$subpath%' order by isdir desc,file_name");
$files=$db->fetchAll();
$documents=array();
$i=0;