Login   Register  
PHP Classes
elePHPant
Icontem

File: Func_Example/dir_files.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tufan Baris YILDIRIM  >  LINQ In PHP  >  Func_Example/dir_files.php  >  Download  
File: Func_Example/dir_files.php
Role: Example script
Content type: text/plain
Description: Select *from dir_files
Class: LINQ In PHP
Query arrays with a SQL-like syntax using LINQ
Author: By
Last change:
Date: 2010-02-25 11:01
Size: 785 bytes
 

Contents

Class file image Download
<?php 
    
include 'D3Linq.php';
   echo 
'<pre>';
    
$linq = new D3Linq();
    
$linq->GetContentsFunc='baglan_curl';
    
$linq->Query("SELECT * FROM dir_files(doc) WHERE type='file'");
    
    while (
$files=$linq->fetch_assoc()){
        
print_r($files);
    }
    
    
    
$linq->Query("SELECT * FROM dir_files(doc) WHERE type='dir'");
    
    while (
$dir=$linq->fetch_assoc()){
        
print_r($dir);
    }
    
    
    
$linq->Query("SELECT * FROM dir_files(doc).dirs WHERE name!='.' AND name!='..'");
    
    while (
$dir=$linq->fetch_assoc()){
        
print_r($dir);
    }
    
    
    
$linq->Query("SELECT * FROM dir_files(doc).files WHERE name LIKE '%D3Linq%'");
    
    while (
$file=$linq->fetch_assoc()){
        
print_r($file);
    }
?>