blob: 8ad111ed1359571e36cfa980dbefbdd8fb890034 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<?
//session_start();
$db = new SQLite3("../database/sqlite.db");
$user=2;
$parent=1;
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++;
}
return $array;
}
$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>";
}
}
|