summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/select.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/www/select.php b/www/select.php
index eb9ce8c..8ad111e 100644
--- a/www/select.php
+++ b/www/select.php
@@ -4,9 +4,9 @@
$db = new SQLite3("../database/sqlite.db");
$user=2;
-$parent=0;
+$parent=1;
-function select_db ($parentdir, $owner, $db){
+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;
@@ -14,9 +14,18 @@ function select_db ($parentdir, $owner, $db){
$array[$count]=$result; /*2D Array, an Stelle $count ist das $result Array mit Ergebnissen des SELECTs abgelegt*/
$count++;
}
-
return $array;
}
-$row = select_db($parent, $user, $db);
-var_dump($row);
+$row = select_db($db, $user, $parent);
+$dimension = count($row);
+echo "dimension: " . $dimension . "<br>";
+
+for($i=0;$i<$dimension;$i++){
+ echo "length [$i]: " . count($row[$i]) . "<br>";
+
+ for($j=0;$j<4;$j++){
+ print_r($row[$i][$j]);
+ echo "<br>";
+ }
+}