summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorHorus32014-02-23 01:21:41 +0100
committerHorus32014-02-23 01:21:41 +0100
commitbe3a6b951626353c15c7d696aeb1c4b4e47f0f3a (patch)
tree4b01b90d231d8fb9f836ae7603ceadc7a3e32e19 /www
parentf0e75141c7ca1a38f38d5e34a68944e9cec0ea54 (diff)
downloadfiles.iamfabulous.de-be3a6b951626353c15c7d696aeb1c4b4e47f0f3a.tar.gz
still messing with recursion
Diffstat (limited to 'www')
-rw-r--r--www/select.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/www/select.php b/www/select.php
index 8ad111e..1dda9cf 100644
--- a/www/select.php
+++ b/www/select.php
@@ -5,14 +5,26 @@
$db = new SQLite3("../database/sqlite.db");
$user=2;
$parent=1;
+$result_db = $db->query("SELECT id, parent, name, share FROM files WHERE parent=$parentdir AND owner=$owner AND folder='DIRECTORY' AND share='PUBLIC';");
+while(!empty($result=$result_db->fetchArray())){
+ $dimension = count($result);
+ for($i=0;$i<$dimension;$i++){
+ echo $result[$i][2];
+ $parentdir=$result[$i][0];
+ $result_db = $db->query("SELECT id, parent, name, share FROM files WHERE parent=$parentdir AND owner=$owner AND folder='DIRECTORY' AND share='PUBLIC';");
+ $result=$result_db->fetchArray();
+ }
+}
+
+/*
function select_db ($db, $owner, $parentdir){
$result_db = $db->query("SELECT id, parent, name, share FROM files WHERE parent=$parentdir AND owner=$owner AND folder='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++;
+/* $count++;
}
return $array;
}
@@ -29,3 +41,4 @@ for($i=0;$i<$dimension;$i++){
echo "<br>";
}
}
+*/