diff options
| author | root | 2014-02-20 00:04:08 +0100 |
|---|---|---|
| committer | root | 2014-02-20 00:04:08 +0100 |
| commit | be37d33f5305e57282ed8cd782fcf596a0626206 (patch) | |
| tree | 3a46b40603dbeeec90b3259301b12eca0590c7e4 /www/select.php | |
| parent | d815a43393f56cea3d88cb929a4cdf5147bf781a (diff) | |
| download | files.iamfabulous.de-be37d33f5305e57282ed8cd782fcf596a0626206.tar.gz | |
folder creation is updated
Diffstat (limited to 'www/select.php')
| -rw-r--r-- | www/select.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/www/select.php b/www/select.php index c609dbe..eb9ce8c 100644 --- a/www/select.php +++ b/www/select.php @@ -6,10 +6,10 @@ $db = new SQLite3("../database/sqlite.db"); $user=2; $parent=0; +function select_db ($parentdir, $owner, $db){ + $result_db = $db->query("SELECT id, parent, name, share FROM files WHERE parent=$parentdir AND owner=$owner AND folder='DIRECTORY' AND share='PUBLIC';"); -function select_db ($parentdir, $owner){ - $result_db = $db->query("SELECT id, folder, name, public FROM files WHERE parent=$parentdir AND owner=$owner AND type='DIRECTORY' AND share='PUBLIC';"); - + $count=0; while ($result = $result_db->fetchArray()){ $array[$count]=$result; /*2D Array, an Stelle $count ist das $result Array mit Ergebnissen des SELECTs abgelegt*/ $count++; @@ -17,3 +17,6 @@ function select_db ($parentdir, $owner){ return $array; } + +$row = select_db($parent, $user, $db); +var_dump($row); |
