heredoc sql

This commit is contained in:
Rudi Grinberg 2012-09-19 11:17:32 -04:00
parent 6001995e01
commit 014da73eed

View file

@ -993,15 +993,18 @@ SQL;
/**
*
* Enter description here ...
* @param $dir_id - if this is not provided, it returns all files with full path constructed.
* @param $dir_id - if this is not provided, it returns all files with full
* path constructed.
*/
public static function listAllFiles($dir_id=null, $all)
{
$con = Propel::getConnection();
$sql = "SELECT filepath as fp"
." FROM CC_FILES as f"
." WHERE f.directory = :dir_id";
$sql = <<<SQL
SELECT filepath AS fp
FROM CC_FILES AS f
WHERE f.directory = :dir_id
SQL;
if (!$all) {
$sql .= " AND f.file_exists = 'TRUE'";