* when get file lists, order by id asc.

This commit is contained in:
wangchunsheng
2010-01-13 06:38:45 +00:00
parent f0f1cf4945
commit a021d65657

View File

@@ -40,7 +40,7 @@ class fileModel extends model
public function getByObject($objectType, $objectID)
{
$files = array();
$stmt = $this->dao->select('*')->from(TABLE_FILE)->where('objectType')->eq($objectType)->andWhere('objectID')->eq((int)$objectID)->query();
$stmt = $this->dao->select('*')->from(TABLE_FILE)->where('objectType')->eq($objectType)->andWhere('objectID')->eq((int)$objectID)->orderBy('id')->query();
while($file = $stmt->fetch())
{
$file->fullPath = $this->webPath . $file->pathname;