summaryrefslogtreecommitdiff
path: root/www/select.php
diff options
context:
space:
mode:
authorroot2014-02-23 18:36:06 +0100
committerroot2014-02-23 18:36:06 +0100
commit9847c616a2ccc60ace80e8fbfafbc99673b09a43 (patch)
treee408dabc4fb188077cdb4200360afeb0179d62a8 /www/select.php
parent8d95fb4b71029d96fa69e1c472b261fec32786c9 (diff)
downloadfiles.iamfabulous.de-9847c616a2ccc60ace80e8fbfafbc99673b09a43.tar.gz
minor
Diffstat (limited to 'www/select.php')
-rw-r--r--www/select.php22
1 files changed, 13 insertions, 9 deletions
diff --git a/www/select.php b/www/select.php
index 1dda9cf..78ab1bc 100644
--- a/www/select.php
+++ b/www/select.php
@@ -3,18 +3,22 @@
//session_start();
$db = new SQLite3("../database/sqlite.db");
-$user=2;
-$parent=1;
+$owner=2;
+$parentdir=0;
+$count=0;
$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();
+while($result[$count]=$result_db->fetchArray(SQLITE3_NUM)){
+ while(!empty($result)){
+ $dimension = count($result);
+ for($i=0;$i<$dimension;$i++){
+ echo "result: " . $result[$i][2] . " dimension: " . $dimension . " ";
+ $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[$count]=$result_db->fetchArray();
+ }
}
+ $count++;
}
/*