heredoc sql
This commit is contained in:
parent
6001995e01
commit
014da73eed
1 changed files with 7 additions and 4 deletions
|
@ -993,15 +993,18 @@ SQL;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Enter description here ...
|
* 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)
|
public static function listAllFiles($dir_id=null, $all)
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection();
|
$con = Propel::getConnection();
|
||||||
|
|
||||||
$sql = "SELECT filepath as fp"
|
$sql = <<<SQL
|
||||||
." FROM CC_FILES as f"
|
SELECT filepath AS fp
|
||||||
." WHERE f.directory = :dir_id";
|
FROM CC_FILES AS f
|
||||||
|
WHERE f.directory = :dir_id
|
||||||
|
SQL;
|
||||||
|
|
||||||
if (!$all) {
|
if (!$all) {
|
||||||
$sql .= " AND f.file_exists = 'TRUE'";
|
$sql .= " AND f.file_exists = 'TRUE'";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue