Re: MySQL, Bash

hier die neueren

<?php
session_start ();
?>

<form method="POST" action="./form0001.php">
<input type="password" name="p1"></input>
<input type="submit">
</form>

<?php
setcookie ("c1", "c1", time () + 3600);

echo session_id () . "<br>n";
echo htmlentities (\$_POST ["p1"]) . "<br>n";
echo htmlentities (\$_COOKIE ["c1"]) . "<br>n";
echo htmlentities (\$_COOKIE ["c1a"]) . "<br>n";

session_destroy ();
?>
2022-09-17/form0001.php
POST http://localhost/form0001.php HTTP/1.1
host: localhost
Cookie: c1a=c1a
Content-Length: 5
Content-Type: application/x-www-form-urlencoded

p1=p1

2022-09-17/httprequest0001.txt
0 0<br>
0 1<br>
1 0<br>
1 1<br>
2 7<br>
8 3<br>
<br><br>

0 1<br>
1 0<br>
8 3<br>
<br><br>

0 0 0 1<br>
0 1 0 1<br>
1 0 1 0<br>
1 1 1 0<br>
8 3 8 3<br>
<br><br>

2022-09-17/output0001_01.txt
41<br>
37<br>
53<br>
34<br>
36<br>
10<br>
17<br>
49<br>
9<br>
57<br>
48<br>
50<br>
30<br>
31<br>
39<br>
22<br>
33<br>
18<br>
29<br>
59<br>
25<br>
54<br>
35<br>
16<br>
126<br>
43<br>
11<br>
67<br>
79<br>
24<br>
15<br>
71<br>
115<br>
81<br>
123<br>
103<br>
78<br>
104<br>
21<br>
84<br>
27<br>
68<br>
116<br>
40<br>
88<br>
60<br>
<br><br>

41<br>
37<br>
53<br>
34<br>
36<br>
10<br>
17<br>
49<br>
9<br>
57<br>
48<br>
50<br>
30<br>
31<br>
39<br>
22<br>
33<br>
18<br>
29<br>
59<br>
25<br>
54<br>
35<br>
16<br>
74<br>
38<br>
107<br>
112<br>
4<br>
78<br>
47<br>
115<br>
63<br>
116<br>
99<br>
80<br>
83<br>
11<br>
79<br>
72<br>
85<br>
24<br>
88<br>
26<br>
97<br>
<br><br>

126<br>
43<br>
11<br>
67<br>
79<br>
59<br>
24<br>
15<br>
71<br>
115<br>
36<br>
81<br>
57<br>
18<br>
37<br>
123<br>
103<br>
78<br>
104<br>
21<br>
84<br>
9<br>
27<br>
25<br>
68<br>
116<br>
40<br>
48<br>
88<br>
60<br>
74<br>
38<br>
107<br>
112<br>
33<br>
4<br>
47<br>
54<br>
22<br>
63<br>
99<br>
80<br>
83<br>
72<br>
85<br>
26<br>
97<br>
29<br>
<br><br>

41<br>
37<br>
53<br>
34<br>
36<br>
10<br>
17<br>
49<br>
9<br>
57<br>
48<br>
50<br>
30<br>
31<br>
39<br>
22<br>
33<br>
18<br>
29<br>
59<br>
25<br>
54<br>
35<br>
16<br>
126<br>
43<br>
11<br>
67<br>
79<br>
24<br>
15<br>
71<br>
115<br>
81<br>
123<br>
103<br>
78<br>
104<br>
21<br>
84<br>
27<br>
68<br>
116<br>
40<br>
88<br>
60<br>
<br><br>

41<br>
37<br>
53<br>
34<br>
36<br>
10<br>
17<br>
49<br>
9<br>
57<br>
48<br>
50<br>
30<br>
31<br>
39<br>
22<br>
33<br>
18<br>
29<br>
59<br>
25<br>
54<br>
35<br>
16<br>
74<br>
38<br>
107<br>
112<br>
4<br>
78<br>
47<br>
115<br>
63<br>
116<br>
99<br>
80<br>
83<br>
11<br>
79<br>
72<br>
85<br>
24<br>
88<br>
26<br>
97<br>
<br><br>

126<br>
43<br>
11<br>
67<br>
79<br>
59<br>
24<br>
15<br>
71<br>
115<br>
36<br>
81<br>
57<br>
18<br>
37<br>
123<br>
103<br>
78<br>
104<br>
21<br>
84<br>
9<br>
27<br>
25<br>
68<br>
116<br>
40<br>
48<br>
88<br>
60<br>
74<br>
38<br>
107<br>
112<br>
33<br>
4<br>
47<br>
54<br>
22<br>
63<br>
99<br>
80<br>
83<br>
72<br>
85<br>
26<br>
97<br>
29<br>
<br><br>

4<br>
9<br>
10<br>
11<br>
15<br>
16<br>
17<br>
18<br>
21<br>
22<br>
24<br>
25<br>
26<br>
27<br>
29<br>
30<br>
31<br>
33<br>
34<br>
35<br>
36<br>
37<br>
38<br>
39<br>
40<br>
41<br>
43<br>
47<br>
48<br>
49<br>
50<br>
53<br>
54<br>
57<br>
59<br>
60<br>
63<br>
67<br>
68<br>
71<br>
72<br>
74<br>
78<br>
79<br>
80<br>
81<br>
83<br>
84<br>
85<br>
88<br>
97<br>
99<br>
103<br>
104<br>
107<br>
112<br>
115<br>
116<br>
123<br>
126<br>
<br><br>

4<br>
9<br>
10<br>
11<br>
15<br>
16<br>
17<br>
18<br>
21<br>
22<br>
24<br>
25<br>
26<br>
27<br>
29<br>
30<br>
31<br>
33<br>
34<br>
35<br>
36<br>
37<br>
38<br>
39<br>
40<br>
41<br>
43<br>
47<br>
48<br>
49<br>
50<br>
53<br>
54<br>
57<br>
59<br>
60<br>
63<br>
67<br>
68<br>
71<br>
72<br>
74<br>
78<br>
79<br>
80<br>
81<br>
83<br>
84<br>
85<br>
88<br>
97<br>
99<br>
103<br>
104<br>
107<br>
112<br>
115<br>
116<br>
123<br>
126<br>
<br><br>

4<br>
9<br>
10<br>
11<br>
15<br>
16<br>
17<br>
18<br>
21<br>
22<br>
24<br>
25<br>
26<br>
27<br>
29<br>
30<br>
31<br>
33<br>
34<br>
35<br>
36<br>
37<br>
38<br>
39<br>
40<br>
41<br>
43<br>
47<br>
48<br>
49<br>
50<br>
53<br>
54<br>
57<br>
59<br>
60<br>
63<br>
67<br>
68<br>
71<br>
72<br>
74<br>
78<br>
79<br>
80<br>
81<br>
83<br>
84<br>
85<br>
88<br>
97<br>
99<br>
103<br>
104<br>
107<br>
112<br>
115<br>
116<br>
123<br>
126<br>
<br><br>

4<br>
9<br>
10<br>
11<br>
15<br>
16<br>
17<br>
18<br>
21<br>
22<br>
24<br>
25<br>
26<br>
27<br>
29<br>
30<br>
31<br>
33<br>
34<br>
35<br>
36<br>
37<br>
38<br>
39<br>
40<br>
41<br>
43<br>
47<br>
48<br>
49<br>
50<br>
53<br>
54<br>
57<br>
59<br>
60<br>
63<br>
67<br>
68<br>
71<br>
72<br>
74<br>
78<br>
79<br>
80<br>
81<br>
83<br>
84<br>
85<br>
88<br>
97<br>
99<br>
103<br>
104<br>
107<br>
112<br>
115<br>
116<br>
123<br>
126<br>
<br><br>

4<br>
9<br>
10<br>
11<br>
15<br>
16<br>
17<br>
18<br>
21<br>
22<br>
24<br>
25<br>
26<br>
27<br>
29<br>
30<br>
31<br>
33<br>
34<br>
35<br>
36<br>
37<br>
38<br>
39<br>
40<br>
41<br>
43<br>
47<br>
48<br>
49<br>
50<br>
53<br>
54<br>
57<br>
59<br>
60<br>
63<br>
67<br>
68<br>
71<br>
72<br>
74<br>
78<br>
79<br>
80<br>
81<br>
83<br>
84<br>
85<br>
88<br>
97<br>
99<br>
103<br>
104<br>
107<br>
112<br>
115<br>
116<br>
123<br>
126<br>
<br><br>

4<br>
9<br>
10<br>
11<br>
15<br>
16<br>
17<br>
18<br>
21<br>
22<br>
24<br>
25<br>
26<br>
27<br>
29<br>
30<br>
31<br>
33<br>
34<br>
35<br>
36<br>
37<br>
38<br>
39<br>
40<br>
41<br>
43<br>
47<br>
48<br>
49<br>
50<br>
53<br>
54<br>
57<br>
59<br>
60<br>
63<br>
67<br>
68<br>
71<br>
72<br>
74<br>
78<br>
79<br>
80<br>
81<br>
83<br>
84<br>
85<br>
88<br>
97<br>
99<br>
103<br>
104<br>
107<br>
112<br>
115<br>
116<br>
123<br>
126<br>
<br><br>

2022-09-17/output0001_03.txt
<?php
include ("/home/david/db_settings.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE q1v3";
\$db->query (\$sql);

\$sql = "USE q1v3";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x INTEGER); CREATE TABLE b (x INTEGER); CREATE TABLE c (x INTEGER)";
\$db->query (\$sql);

for (\$i = 0;  \$i < 32;  \$i++) {
    \$sql = "INSERT INTO a VALUES (" . rand () % 64 ."); ";
    \$sql .= "INSERT INTO b VALUES (" . rand () % 128 . "); ";
    \$sql .= "INSERT INTO c VALUES (" . rand () % 128 . ");";
    \$db->query (\$sql);
}

\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";
\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x
                INTERSECT
            SELECT x FROM c
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x
                UNION
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM b
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x
                UNION
            SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM b) x
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM a
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM a) x
                UNION
            SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM a) x
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$db = null;
?>
2022-09-17/quantity0001.php
<?php
include ("/home/david/db_settings.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE t1v3";
\$db->query (\$sql);

\$sql = "USE t1v3";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x1 INTEGER, x2 INTEGER); CREATE TABLE b (y1 INTEGER, y2 INTEGER)";
\$db->query (\$sql);

\$sql = "INSERT INTO a (x1, x2) VALUES (0, 0); INSERT INTO a (x1, x2) VALUES (0, 1); INSERT INTO a (x1, x2) VALUES (1, 0); INSERT INTO a (x1, x2) VALUES (1, 1); INSERT INTO a (x1, x2) VALUES (2, 7); INSERT INTO a (x1, x2) VALUES (8, 3); INSERT INTO b (y1, y2) VALUES (0, 1); INSERT INTO b (y1, y2) VALUES (1, 0); INSERT INTO b (y1, y2) VALUES (8, 3)";
\$db->query (\$sql);

\$sql = "SELECT * FROM a";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT * FROM b";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT * FROM a INNER JOIN b ON a.x1 = b.y1";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . " " . \$row [2] . " " . \$row[3] . "<br>n";
echo "<br><br>nn";

\$db = null;
?>
2022-09-17/test0001.php
<?php
session_start ();
?>

<form method="POST" action="./form0002.php">
<input type="password" name="p2"></input>
<input type="submit">
</form>

<?php
setcookie ("c2", "c2", time () + 1200);

echo session_id () . "<br>n";

echo htmlentities (\$_COOKIE ["c2"]) . "<br>n";
echo htmlentities (\$_COOKIE ["c2a"]) . "<br>n";
echo htmlentities (\$_POST ["p2"]) . "<br>n";

session_destroy ();
?>
2022-09-18/form0002.php
POST http://localhost/form0002.php HTTP/1.1
host: localhost
Cookie: c2a=c2a
Content-Length: 5
Content-Type: application/x-www-form-urlencoded

p2=p2
2022-09-18/httprequest0002.txt
0 0<br>
0 1<br>
1 0<br>
1 1<br>
2 7<br>
8 3<br>
<br><br>

0 1<br>
1 0<br>
2 7<br>
8 3<br>
<br><br>

0 0 0 1<br>
0 1 0 1<br>
1 0 1 0<br>
1 1 1 0<br>
2 7 2 7<br>
8 3 8 3<br>
<br><br>

2022-09-18/output0002_01.txt
10<br>
22<br>
8<br>
2<br>
13<br>
4<br>
0<br>
5<br>
7<br>
29<br>
23<br>
11<br>
14<br>
3<br>
28<br>
17<br>
12<br>
18<br>
21<br>
9<br>
19<br>
1<br>
6<br>
27<br>
20<br>
24<br>
30<br>
77<br>
103<br>
35<br>
33<br>
123<br>
43<br>
63<br>
86<br>
89<br>
116<br>
34<br>
25<br>
83<br>
88<br>
51<br>
70<br>
66<br>
125<br>
96<br>
38<br>
76<br>
85<br>
97<br>
92<br>
104<br>
101<br>
78<br>
71<br>
53<br>
112<br>
46<br>
120<br>
119<br>
84<br>
115<br>
100<br>
105<br>
41<br>
62<br>
<br><br>

10<br>
22<br>
8<br>
2<br>
13<br>
4<br>
0<br>
5<br>
7<br>
29<br>
23<br>
11<br>
14<br>
3<br>
28<br>
17<br>
12<br>
18<br>
21<br>
9<br>
19<br>
1<br>
6<br>
27<br>
20<br>
24<br>
30<br>
38<br>
63<br>
58<br>
50<br>
52<br>
34<br>
25<br>
61<br>
44<br>
54<br>
16<br>
37<br>
35<br>
43<br>
45<br>
46<br>
31<br>
51<br>
47<br>
62<br>
48<br>
60<br>
33<br>
15<br>
<br><br>

77<br>
103<br>
21<br>
35<br>
33<br>
123<br>
43<br>
63<br>
86<br>
89<br>
116<br>
34<br>
7<br>
25<br>
30<br>
83<br>
88<br>
51<br>
8<br>
19<br>
70<br>
66<br>
125<br>
96<br>
38<br>
76<br>
1<br>
85<br>
97<br>
17<br>
10<br>
92<br>
104<br>
101<br>
78<br>
71<br>
3<br>
53<br>
5<br>
112<br>
46<br>
120<br>
119<br>
84<br>
115<br>
100<br>
105<br>
41<br>
62<br>
2<br>
24<br>
58<br>
50<br>
13<br>
52<br>
14<br>
4<br>
12<br>
20<br>
61<br>
44<br>
54<br>
16<br>
37<br>
0<br>
45<br>
6<br>
31<br>
47<br>
11<br>
9<br>
28<br>
48<br>
60<br>
29<br>
15<br>
<br><br>

10<br>
22<br>
8<br>
2<br>
13<br>
4<br>
0<br>
5<br>
7<br>
29<br>
23<br>
11<br>
14<br>
3<br>
28<br>
17<br>
12<br>
18<br>
21<br>
9<br>
19<br>
1<br>
6<br>
27<br>
20<br>
24<br>
30<br>
77<br>
103<br>
35<br>
33<br>
123<br>
43<br>
63<br>
86<br>
89<br>
116<br>
34<br>
25<br>
83<br>
88<br>
51<br>
70<br>
66<br>
125<br>
96<br>
38<br>
76<br>
85<br>
97<br>
92<br>
104<br>
101<br>
78<br>
71<br>
53<br>
112<br>
46<br>
120<br>
119<br>
84<br>
115<br>
100<br>
105<br>
41<br>
62<br>
<br><br>

10<br>
22<br>
8<br>
2<br>
13<br>
4<br>
0<br>
5<br>
7<br>
29<br>
23<br>
11<br>
14<br>
3<br>
28<br>
17<br>
12<br>
18<br>
21<br>
9<br>
19<br>
1<br>
6<br>
27<br>
20<br>
24<br>
30<br>
38<br>
63<br>
58<br>
50<br>
52<br>
34<br>
25<br>
61<br>
44<br>
54<br>
16<br>
37<br>
35<br>
43<br>
45<br>
46<br>
31<br>
51<br>
47<br>
62<br>
48<br>
60<br>
33<br>
15<br>
<br><br>

77<br>
103<br>
21<br>
35<br>
33<br>
123<br>
43<br>
63<br>
86<br>
89<br>
116<br>
34<br>
7<br>
25<br>
30<br>
83<br>
88<br>
51<br>
8<br>
19<br>
70<br>
66<br>
125<br>
96<br>
38<br>
76<br>
1<br>
85<br>
97<br>
17<br>
10<br>
92<br>
104<br>
101<br>
78<br>
71<br>
3<br>
53<br>
5<br>
112<br>
46<br>
120<br>
119<br>
84<br>
115<br>
100<br>
105<br>
41<br>
62<br>
2<br>
24<br>
58<br>
50<br>
13<br>
52<br>
14<br>
4<br>
12<br>
20<br>
61<br>
44<br>
54<br>
16<br>
37<br>
0<br>
45<br>
6<br>
31<br>
47<br>
11<br>
9<br>
28<br>
48<br>
60<br>
29<br>
15<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
16<br>
17<br>
18<br>
19<br>
20<br>
21<br>
22<br>
23<br>
24<br>
25<br>
27<br>
28<br>
29<br>
30<br>
31<br>
33<br>
34<br>
35<br>
37<br>
38<br>
41<br>
43<br>
44<br>
45<br>
46<br>
47<br>
48<br>
50<br>
51<br>
52<br>
53<br>
54<br>
58<br>
60<br>
61<br>
62<br>
63<br>
66<br>
70<br>
71<br>
76<br>
77<br>
78<br>
83<br>
84<br>
85<br>
86<br>
88<br>
89<br>
92<br>
96<br>
97<br>
100<br>
101<br>
103<br>
104<br>
105<br>
112<br>
115<br>
116<br>
119<br>
120<br>
123<br>
125<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
16<br>
17<br>
18<br>
19<br>
20<br>
21<br>
22<br>
23<br>
24<br>
25<br>
27<br>
28<br>
29<br>
30<br>
31<br>
33<br>
34<br>
35<br>
37<br>
38<br>
41<br>
43<br>
44<br>
45<br>
46<br>
47<br>
48<br>
50<br>
51<br>
52<br>
53<br>
54<br>
58<br>
60<br>
61<br>
62<br>
63<br>
66<br>
70<br>
71<br>
76<br>
77<br>
78<br>
83<br>
84<br>
85<br>
86<br>
88<br>
89<br>
92<br>
96<br>
97<br>
100<br>
101<br>
103<br>
104<br>
105<br>
112<br>
115<br>
116<br>
119<br>
120<br>
123<br>
125<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
16<br>
17<br>
18<br>
19<br>
20<br>
21<br>
22<br>
23<br>
24<br>
25<br>
27<br>
28<br>
29<br>
30<br>
31<br>
33<br>
34<br>
35<br>
37<br>
38<br>
41<br>
43<br>
44<br>
45<br>
46<br>
47<br>
48<br>
50<br>
51<br>
52<br>
53<br>
54<br>
58<br>
60<br>
61<br>
62<br>
63<br>
66<br>
70<br>
71<br>
76<br>
77<br>
78<br>
83<br>
84<br>
85<br>
86<br>
88<br>
89<br>
92<br>
96<br>
97<br>
100<br>
101<br>
103<br>
104<br>
105<br>
112<br>
115<br>
116<br>
119<br>
120<br>
123<br>
125<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
16<br>
17<br>
18<br>
19<br>
20<br>
21<br>
22<br>
23<br>
24<br>
25<br>
27<br>
28<br>
29<br>
30<br>
31<br>
33<br>
34<br>
35<br>
37<br>
38<br>
41<br>
43<br>
44<br>
45<br>
46<br>
47<br>
48<br>
50<br>
51<br>
52<br>
53<br>
54<br>
58<br>
60<br>
61<br>
62<br>
63<br>
66<br>
70<br>
71<br>
76<br>
77<br>
78<br>
83<br>
84<br>
85<br>
86<br>
88<br>
89<br>
92<br>
96<br>
97<br>
100<br>
101<br>
103<br>
104<br>
105<br>
112<br>
115<br>
116<br>
119<br>
120<br>
123<br>
125<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
16<br>
17<br>
18<br>
19<br>
20<br>
21<br>
22<br>
23<br>
24<br>
25<br>
27<br>
28<br>
29<br>
30<br>
31<br>
33<br>
34<br>
35<br>
37<br>
38<br>
41<br>
43<br>
44<br>
45<br>
46<br>
47<br>
48<br>
50<br>
51<br>
52<br>
53<br>
54<br>
58<br>
60<br>
61<br>
62<br>
63<br>
66<br>
70<br>
71<br>
76<br>
77<br>
78<br>
83<br>
84<br>
85<br>
86<br>
88<br>
89<br>
92<br>
96<br>
97<br>
100<br>
101<br>
103<br>
104<br>
105<br>
112<br>
115<br>
116<br>
119<br>
120<br>
123<br>
125<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
16<br>
17<br>
18<br>
19<br>
20<br>
21<br>
22<br>
23<br>
24<br>
25<br>
27<br>
28<br>
29<br>
30<br>
31<br>
33<br>
34<br>
35<br>
37<br>
38<br>
41<br>
43<br>
44<br>
45<br>
46<br>
47<br>
48<br>
50<br>
51<br>
52<br>
53<br>
54<br>
58<br>
60<br>
61<br>
62<br>
63<br>
66<br>
70<br>
71<br>
76<br>
77<br>
78<br>
83<br>
84<br>
85<br>
86<br>
88<br>
89<br>
92<br>
96<br>
97<br>
100<br>
101<br>
103<br>
104<br>
105<br>
112<br>
115<br>
116<br>
119<br>
120<br>
123<br>
125<br>
<br><br>

2022-09-18/output0002_03.txt
<?php
include ("/home/david/db_settings.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE q2v3";
\$db->query (\$sql);

\$sql = "USE q2v3";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x INTEGER); CREATE TABLE b (x INTEGER); CREATE TABLE c (x INTEGER)";
\$db->query (\$sql);

for (\$i = 0;  \$i < 64;  \$i++) {
    \$sql = "INSERT INTO a VALUES (" . rand () % 32 . "); ";
    \$sql .= "INSERT INTO b VALUES (" . rand () % 128 . "); ";
    \$sql .= "INSERT INTO c VALUES (" . rand () % 64 . "); ";
    \$db->query (\$sql);
}

\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";
\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x
                INTERSECT
            SELECT x FROM c
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x
                UNION
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM b
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x
                UNION
            SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM b) x
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM a
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM a) x
                UNION
            SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM a) x
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$db = null;
?>
2022-09-18/quantity0002.php
<?php
include ("/home/david/db_settings.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "DROP DATABASE t2v3";
\$db->query (\$sql);

\$sql = "CREATE DATABASE t2v3";
\$db->query (\$sql);

\$sql = "USE t2v3";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x1 INTEGER, x2 INTEGER); CREATE TABLE b (y1 INTEGER, y2 INTEGER)";
\$db->query (\$sql);

\$sql = "INSERT INTO a (x1, x2) VALUES (0, 0); INSERT INTO a (x1, x2) VALUES (0, 1); INSERT INTO a (x1, x2) VALUES (1, 0); INSERT INTO a (x1, x2) VALUES (1, 1); INSERT INTO a (x1, x2) VALUES (2, 7); INSERT INTO a (x1, x2) VALUES (8, 3); INSERT INTO b (y1, y2) VALUES (0, 1); INSERT INTO b (y1, y2) VALUES (1, 0); INSERT INTO b (y1, y2) VALUES (2, 7); INSERT INTO b (y1, y2) VALUES (8, 3)";
\$db->query (\$sql);

\$sql = "SELECT * FROM a";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT * FROM b";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT * FROM a INNER JOIN b ON a.x1 = b.y1";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . " " . \$row [2] . " " . \$row [3] . "<br>n";
echo "<br><br>nn";


\$db = null;
?>
2022-09-18/test0002.php
<?php
session_start ();
?>

<form method="POST" action="./form0003.php">
<input type="password" name="p3"></input>
<input type="submit"></input>
</form>

<?php
echo session_id () . "<br>n";

setcookie ("c3v3", "c3v3", time () + 1200);

echo htmlentities (\$_POST ["p3"]) . "<br>n";
echo htmlentities (\$_COOKIE ["c3v3"]) . "<br>n";
echo htmlentities (\$_COOKIE ["c3v3a"]) . "<br>n";

session_destroy ();
?>

2022-09-19/form0003.php
POST http://localhost/form0003.php HTTP/1.1
host: localhost
Cookie: c3v3a=c3v3a
Content-Length: 5
Content-Type: application/x-www-form-urlencoded

p3=p3
2022-09-19/httprequest0003.txt
1 1<br>
1 2<br>
2 1<br>
2 2<br>
10 13<br>
14 27<br>
<br><br>

1 2<br>
2 1<br>
14 27<br>
10 13<br>
<br><br>

1 1 2 1<br>
1 2 1 2<br>
2 1 2 1<br>
2 2 1 2<br>
10 13 10 13<br>
14 27 14 27<br>
<br><br>

2022-09-19/output0003_01.txt
15<br>
102<br>
106<br>
40<br>
68<br>
8<br>
61<br>
47<br>
24<br>
33<br>
108<br>
10<br>
83<br>
69<br>
4<br>
56<br>
88<br>
109<br>
74<br>
122<br>
32<br>
6<br>
31<br>
38<br>
41<br>
30<br>
49<br>
27<br>
42<br>
34<br>
5<br>
28<br>
13<br>
11<br>
12<br>
59<br>
<br><br>

15<br>
102<br>
106<br>
40<br>
68<br>
8<br>
61<br>
47<br>
24<br>
33<br>
108<br>
10<br>
83<br>
69<br>
4<br>
56<br>
88<br>
109<br>
74<br>
122<br>
32<br>
14<br>
17<br>
6<br>
29<br>
18<br>
20<br>
13<br>
19<br>
26<br>
3<br>
23<br>
31<br>
25<br>
21<br>
<br><br>

6<br>
56<br>
24<br>
31<br>
38<br>
41<br>
30<br>
49<br>
27<br>
4<br>
42<br>
34<br>
5<br>
28<br>
13<br>
11<br>
12<br>
59<br>
32<br>
14<br>
17<br>
29<br>
18<br>
20<br>
15<br>
19<br>
26<br>
3<br>
23<br>
25<br>
8<br>
21<br>
<br><br>

15<br>
102<br>
106<br>
40<br>
68<br>
8<br>
61<br>
47<br>
24<br>
33<br>
108<br>
10<br>
83<br>
69<br>
4<br>
56<br>
88<br>
109<br>
74<br>
122<br>
32<br>
6<br>
31<br>
38<br>
41<br>
30<br>
49<br>
27<br>
42<br>
34<br>
5<br>
28<br>
13<br>
11<br>
12<br>
59<br>
<br><br>

15<br>
102<br>
106<br>
40<br>
68<br>
8<br>
61<br>
47<br>
24<br>
33<br>
108<br>
10<br>
83<br>
69<br>
4<br>
56<br>
88<br>
109<br>
74<br>
122<br>
32<br>
14<br>
17<br>
6<br>
29<br>
18<br>
20<br>
13<br>
19<br>
26<br>
3<br>
23<br>
31<br>
25<br>
21<br>
<br><br>

6<br>
56<br>
24<br>
31<br>
38<br>
41<br>
30<br>
49<br>
27<br>
4<br>
42<br>
34<br>
5<br>
28<br>
13<br>
11<br>
12<br>
59<br>
32<br>
14<br>
17<br>
29<br>
18<br>
20<br>
15<br>
19<br>
26<br>
3<br>
23<br>
25<br>
8<br>
21<br>
<br><br>

3<br>
4<br>
5<br>
6<br>
8<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
17<br>
18<br>
19<br>
20<br>
21<br>
23<br>
24<br>
25<br>
26<br>
27<br>
28<br>
29<br>
30<br>
31<br>
32<br>
33<br>
34<br>
38<br>
40<br>
41<br>
42<br>
47<br>
49<br>
56<br>
59<br>
61<br>
68<br>
69<br>
74<br>
83<br>
88<br>
102<br>
106<br>
108<br>
109<br>
122<br>
<br><br>

3<br>
4<br>
5<br>
6<br>
8<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
17<br>
18<br>
19<br>
20<br>
21<br>
23<br>
24<br>
25<br>
26<br>
27<br>
28<br>
29<br>
30<br>
31<br>
32<br>
33<br>
34<br>
38<br>
40<br>
41<br>
42<br>
47<br>
49<br>
56<br>
59<br>
61<br>
68<br>
69<br>
74<br>
83<br>
88<br>
102<br>
106<br>
108<br>
109<br>
122<br>
<br><br>

3<br>
4<br>
5<br>
6<br>
8<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
17<br>
18<br>
19<br>
20<br>
21<br>
23<br>
24<br>
25<br>
26<br>
27<br>
28<br>
29<br>
30<br>
31<br>
32<br>
33<br>
34<br>
38<br>
40<br>
41<br>
42<br>
47<br>
49<br>
56<br>
59<br>
61<br>
68<br>
69<br>
74<br>
83<br>
88<br>
102<br>
106<br>
108<br>
109<br>
122<br>
<br><br>

3<br>
4<br>
5<br>
6<br>
8<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
17<br>
18<br>
19<br>
20<br>
21<br>
23<br>
24<br>
25<br>
26<br>
27<br>
28<br>
29<br>
30<br>
31<br>
32<br>
33<br>
34<br>
38<br>
40<br>
41<br>
42<br>
47<br>
49<br>
56<br>
59<br>
61<br>
68<br>
69<br>
74<br>
83<br>
88<br>
102<br>
106<br>
108<br>
109<br>
122<br>
<br><br>

3<br>
4<br>
5<br>
6<br>
8<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
17<br>
18<br>
19<br>
20<br>
21<br>
23<br>
24<br>
25<br>
26<br>
27<br>
28<br>
29<br>
30<br>
31<br>
32<br>
33<br>
34<br>
38<br>
40<br>
41<br>
42<br>
47<br>
49<br>
56<br>
59<br>
61<br>
68<br>
69<br>
74<br>
83<br>
88<br>
102<br>
106<br>
108<br>
109<br>
122<br>
<br><br>

3<br>
4<br>
5<br>
6<br>
8<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
17<br>
18<br>
19<br>
20<br>
21<br>
23<br>
24<br>
25<br>
26<br>
27<br>
28<br>
29<br>
30<br>
31<br>
32<br>
33<br>
34<br>
38<br>
40<br>
41<br>
42<br>
47<br>
49<br>
56<br>
59<br>
61<br>
68<br>
69<br>
74<br>
83<br>
88<br>
102<br>
106<br>
108<br>
109<br>
122<br>
<br><br>

2022-09-19/output0003_03.txt
<?php
include ("/home/david/db_settings.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE q3v3";
\$db->query (\$sql);

\$sql = "USE q3v3";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x INTEGER); CREATE TABLE b (x INTEGER); CREATE TABLE c (x INTEGER)";
\$db->query (\$sql);

for (\$i = 0;  \$i < 24;  \$i++) {
    \$sql = "INSERT INTO a VALUES (" . rand () % 128 . "); ";
    \$sql .= "INSERT INTO b VALUES (" . rand () % 64 . "); ";
    \$sql .= "INSERT INTO c VALUES (" . rand () % 32 . "); ";
    \$db->query (\$sql);
}

\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";
\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x
                INTERSECT
            SELECT x FROM c
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x
                UNION
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";



\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM b
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x
                UNION
            SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM b) x
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";



\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM a
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM a) x
                UNION
            SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM a) x
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$db = null;
?>
2022-09-19/quantity0003.php
<?php
include ("/home/david/db_settings.php");
\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE t3v3";
\$db->query (\$sql);

\$sql = "USE t3v3";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x1 INTEGER, x2 INTEGER); CREATE TABLE b (y1 INTEGER, y2 INTEGER)";
\$db->query (\$sql);

\$sql = "INSERT INTO a (x1, x2) VALUES (1, 1); INSERT INTO a (x1, x2) VALUES (1, 2); INSERT INTO a (x1, x2) VALUES (2, 1); INSERT INTO a (x1, x2) VALUES (2, 2); INSERT INTO a (x1, x2) VALUES (10, 13); INSERT INTO a (x1, x2) VALUES (14, 27); INSERT INTO b (y1, y2) VALUES (1, 2); INSERT INTO b (y1, y2) VALUES (2, 1); INSERT INTO b (y1, y2) VALUES (14, 27); INSERT INTO b (y1, y2) VALUES (10, 13)";
\$db->query (\$sql);

\$sql = "SELECT * FROM a";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT * FROM b";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT * FROM a LEFT JOIN b ON a.x2 = b.y2";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . " " . \$row ["y1"] . " " . \$row ["y2"] . "<br>n";
echo "<br><br>nn";



\$db = null;
?>
2022-09-19/test0003.php
<?php
session_start ();
?>

<form method="POST" action="./form0004.php">
<input type="password" name="p4v3"></input>
<input type="submit"></input>
</form>

<?php
setcookie ("c4v3", "c4v3", time () + 1200);

echo session_id () . "<br>n";

echo htmlentities (\$_POST ["p4v3"]) . "<br>n";
echo htmlentities (\$_COOKIE ["c4v3"]) . "<br>n";
echo htmlentities (\$_COOKIE ["c4v3a"]) . "<br>n";

session_destroy ();
?>
2022-09-20/form0004.php
POST http://localhost/form0004.php HTTP/1.1
host: localhost
Cookie: c4v3a=c4v3a
Content-Length: 9
Content-Type: application/x-www-form-urlencoded

p4v3=p4v3
2022-09-20/httprequest0004.txt
0 0<br>
0 1<br>
1 0<br>
1 1<br>
100 130<br>
2400 107<br>
<br><br>

100 130<br>
2400 107<br>
1 1<br>
<br><br>

100 130 100 130<br>
2400 107 2400 107<br>
1 1 1 1<br>
0 1 1 1<br>
<br><br>

2022-09-20/output0004_01.txt
8<br>
14<br>
11<br>
12<br>
0<br>
9<br>
7<br>
6<br>
2<br>
5<br>
3<br>
1<br>
<br><br>

8<br>
14<br>
11<br>
12<br>
0<br>
9<br>
7<br>
15<br>
30<br>
28<br>
23<br>
24<br>
2<br>
<br><br>

6<br>
2<br>
0<br>
5<br>
3<br>
1<br>
7<br>
15<br>
30<br>
28<br>
23<br>
11<br>
24<br>
12<br>
<br><br>

8<br>
14<br>
11<br>
12<br>
0<br>
9<br>
7<br>
6<br>
2<br>
5<br>
3<br>
1<br>
<br><br>

8<br>
14<br>
11<br>
12<br>
0<br>
9<br>
7<br>
15<br>
30<br>
28<br>
23<br>
24<br>
2<br>
<br><br>

6<br>
2<br>
0<br>
5<br>
3<br>
1<br>
7<br>
15<br>
30<br>
28<br>
23<br>
11<br>
24<br>
12<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
5<br>
6<br>
7<br>
8<br>
9<br>
11<br>
12<br>
14<br>
15<br>
23<br>
24<br>
28<br>
30<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
5<br>
6<br>
7<br>
8<br>
9<br>
11<br>
12<br>
14<br>
15<br>
23<br>
24<br>
28<br>
30<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
5<br>
6<br>
7<br>
8<br>
9<br>
11<br>
12<br>
14<br>
15<br>
23<br>
24<br>
28<br>
30<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
5<br>
6<br>
7<br>
8<br>
9<br>
11<br>
12<br>
14<br>
15<br>
23<br>
24<br>
28<br>
30<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
5<br>
6<br>
7<br>
8<br>
9<br>
11<br>
12<br>
14<br>
15<br>
23<br>
24<br>
28<br>
30<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
5<br>
6<br>
7<br>
8<br>
9<br>
11<br>
12<br>
14<br>
15<br>
23<br>
24<br>
28<br>
30<br>
<br><br>

2022-09-20/output0004_03.txt
<?php
include ("/home/david/db_settings.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE q4v3";
\$db->query (\$sql);

\$sql = "USE q4v3";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x INTEGER); CREATE TABLE b (x INTEGER); CREATE TABLE c (x INTEGER)";
\$db->query (\$sql);

for (\$i = 0;  \$i < 10;  \$i++) {
    \$sql = "INSERT INTO a (x) VALUES (" . rand () % 16 . "); ";
    \$sql .= "INSERT INTO b (x) VALUES (" . rand () % 8 . "); ";
    \$sql .= "INSERT INTO c (x) VALUES (" . rand () % 32 . "); ";
    \$db->query (\$sql);
}

\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row ["x"] . "<br>n";
echo "<br><br>nn";
\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row ["x"] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row ["x"] . "<br>n";
echo "<br><br>nn";



\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row ["x"] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row ["x"] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row ["x"] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x
                INTERSECT
            SELECT x FROM c
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row ["x"] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x
                UNION
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row ["x"] . "<br>n";
echo "<br><br>nn";



\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM b
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row ["x"] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x
                UNION
            SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM b) x
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row ["x"] . "<br>n";
echo "<br><br>nn";




\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM a
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row ["x"] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM a) x
                UNION
            SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM a) x
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row ["x"] . "<br>n";
echo "<br><br>nn";



\$db = null;
?>
2022-09-20/quantity0004.php
<?php
include ("/home/david/db_settings.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE t4v3";
\$db->query (\$sql);

\$sql = "USE t4v3";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x1 INTEGER, x2 INTEGER); CREATE TABLE b (y1 INTEGER, y2 INTEGER)";
\$db->query (\$sql);

\$sql = "INSERT INTO a (x1, x2) VALUES (0, 0); INSERT INTO a (x1, x2) VALUES (0, 1); INSERT INTO a (x1, x2) VALUES (1, 0); INSERT INTO a (x1, x2) VALUES (1, 1); INSERT INTO a (x1, x2) VALUES (100, 130); INSERT INTO a (x1, x2) VALUES (2400, 107); INSERT INTO b (y1, y2) VALUES (100, 130); INSERT INTO b (y1, y2) VALUES (2400, 107); INSERT INTO b (y1, y2) VALUES (1, 1)";
\$db->query (\$sql);

\$sql = "SELECT * FROM a";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT * FROM b";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT * FROM a RIGHT JOIN b ON a.x2 = b.y2";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . " " . \$row [2] . " " . \$row [3] . "<br>n";
echo "<br><br>nn";


\$db = null;
?>
2022-09-20/test0004.php
<?php
session_start ();
?>

<form method="POST" action="./form0005.php">
<input type="password" name="p5v3"></input>
<input type="submit"></input>
</form>

<?php
setcookie ("c5v3", "c5v3", time () + 1200);

echo session_id () . "<br>n";

echo htmlentities (\$_POST ["p5v3"]) . "<br>n";
echo htmlentities (\$_COOKIE ["c5v3"]) . "<br>n";
echo htmlentities (\$_COOKIE ["c5v3a"]) . "<br>n";

session_destroy ();
?>
2022-09-21/form0005.php
POST http://localhost/form0005.php HTTP/1.1
host: localhost
Cookie: c5v3a=c5v3a
Content-Length: 9
Content-Type: application/x-www-form-urlencoded

p5v3=p5v3
2022-09-21/httprequest0005.txt
0 0<br>
0 1<br>
1 0<br>
1 1<br>
3 7<br>
10 4<br>
0 0<br>
0 1<br>
1 0<br>
1 1<br>
3 7<br>
10 4<br>
<br><br>

0 1<br>
1 0<br>
3 7<br>
10 4<br>
0 1<br>
1 0<br>
3 7<br>
10 4<br>
<br><br>

0 1 0 1<br>
0 0 0 1<br>
0 1 0 1<br>
0 0 0 1<br>
1 1 1 0<br>
1 0 1 0<br>
1 1 1 0<br>
1 0 1 0<br>
3 7 3 7<br>
3 7 3 7<br>
10 4 10 4<br>
10 4 10 4<br>
0 1 0 1<br>
0 0 0 1<br>
0 1 0 1<br>
0 0 0 1<br>
1 1 1 0<br>
1 0 1 0<br>
1 1 1 0<br>
1 0 1 0<br>
3 7 3 7<br>
3 7 3 7<br>
10 4 10 4<br>
10 4 10 4<br>
<br><br>

2022-09-21/output0005_01.txt
26<br>
25<br>
16<br>
8<br>
28<br>
30<br>
15<br>
5<br>
0<br>
3<br>
1<br>
12<br>
6<br>
2<br>
7<br>
4<br>
<br><br>

26<br>
25<br>
16<br>
8<br>
28<br>
30<br>
15<br>
5<br>
0<br>
3<br>
116<br>
103<br>
35<br>
24<br>
104<br>
27<br>
123<br>
107<br>
31<br>
1<br>
34<br>
<br><br>

1<br>
15<br>
12<br>
0<br>
3<br>
6<br>
2<br>
7<br>
4<br>
116<br>
103<br>
35<br>
24<br>
104<br>
27<br>
123<br>
107<br>
31<br>
34<br>
<br><br>

26<br>
25<br>
16<br>
8<br>
28<br>
30<br>
15<br>
5<br>
0<br>
3<br>
1<br>
12<br>
6<br>
2<br>
7<br>
4<br>
<br><br>

26<br>
25<br>
16<br>
8<br>
28<br>
30<br>
15<br>
5<br>
0<br>
3<br>
116<br>
103<br>
35<br>
24<br>
104<br>
27<br>
123<br>
107<br>
31<br>
1<br>
34<br>
<br><br>

1<br>
15<br>
12<br>
0<br>
3<br>
6<br>
2<br>
7<br>
4<br>
116<br>
103<br>
35<br>
24<br>
104<br>
27<br>
123<br>
107<br>
31<br>
34<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
12<br>
15<br>
16<br>
24<br>
25<br>
26<br>
27<br>
28<br>
30<br>
31<br>
34<br>
35<br>
103<br>
104<br>
107<br>
116<br>
123<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
12<br>
15<br>
16<br>
24<br>
25<br>
26<br>
27<br>
28<br>
30<br>
31<br>
34<br>
35<br>
103<br>
104<br>
107<br>
116<br>
123<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
12<br>
15<br>
16<br>
24<br>
25<br>
26<br>
27<br>
28<br>
30<br>
31<br>
34<br>
35<br>
103<br>
104<br>
107<br>
116<br>
123<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
12<br>
15<br>
16<br>
24<br>
25<br>
26<br>
27<br>
28<br>
30<br>
31<br>
34<br>
35<br>
103<br>
104<br>
107<br>
116<br>
123<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
12<br>
15<br>
16<br>
24<br>
25<br>
26<br>
27<br>
28<br>
30<br>
31<br>
34<br>
35<br>
103<br>
104<br>
107<br>
116<br>
123<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
12<br>
15<br>
16<br>
24<br>
25<br>
26<br>
27<br>
28<br>
30<br>
31<br>
34<br>
35<br>
103<br>
104<br>
107<br>
116<br>
123<br>
<br><br>

2022-09-21/output0005_03.txt
<?php
include ("/home/david/db_settings.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE q5v3";
\$db->query (\$sql);

\$sql = "USE q5v3";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x INTEGER); CREATE TABLE b (x INTEGER); CREATE TABLE c (x INTEGER)";
\$db->query (\$sql);

for (\$i = 0;   \$i < 12;   \$i++) {
    \$sql = "INSERT INTO a (x) VALUES (" . rand () % 32 . "); ";
    \$sql .= "INSERT INTO b (x) VALUES (" . rand () % 16 . "); ";
    \$sql .= "INSERT INTO c (x) VALUES (" . rand () % 128 . "); ";
    \$db->query (\$sql);
}

\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";
\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x
                INTERSECT
            SELECT x FROM c
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x
                UNION
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM b
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x
                UNION
            SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM b) x
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM a
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM a) x
                UNION
            SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM a) x
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$db = null;
?>
2022-09-21/quantity0005.php
<?php
include ("/home/david/db_settings.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE t5v3";
\$db->query (\$sql);

\$sql = "USE t5v3";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x1 INTEGER, x2 INTEGER); CREATE TABLE b (y1 INTEGER, y2 INTEGER)";
\$db->query (\$sql);

\$sql = "INSERT INTO a (x1, x2) VALUES (0, 0); INSERT INTO a (x1, x2) VALUES (0, 1); INSERT INTO a (x1, x2) VALUES (1, 0); INSERT INTO a (x1, x2) VALUES (1, 1); INSERT INTO a (x1, x2) VALUES (3, 7); INSERT INTO a (x1, x2) VALUES (10, 4); INSERT INTO b VALUES (0, 1); INSERT INTO b VALUES (1, 0); INSERT INTO b (y1, y2) VALUES (3, 7); INSERT INTO b (y1, y2) VALUES (10, 4)";
\$db->query (\$sql);

\$sql = "SELECT * FROM a";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT * FROM b";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT * FROM a RIGHT JOIN b ON a.x1 = b.y1";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . " " . \$row [2] . " " . \$row [3] . "<br>n";
echo "<br><br>nn";


\$db = null;
?>
2022-09-21/test0005.php
<?php
session_start ();
?>

<form method="POST" action="./form0006.php">
<input type="text" name="t6v3"></input>
<input type="submit"></input>
</form>

<?php
echo session_id ();

setcookie ("c6v3a", "c6v3a", time () + 1200);

echo htmlentities (\$_COOKIE ["c6v3"]) . "<br>n";
echo htmlentities (\$_COOKIE ["c6v3a"]) . "<br>n";
echo htmlentities (\$_POST ["t6v3"]) . "<br>n";

session_destroy ();
?>
2022-09-22/form0006.php
POST http://localhost/form0006.php HTTP/1.1
host: localhost
Cookie: c6v3a=c6v3a
Content-Length: 9
Content-Type: application/x-www-form-urlencoded

t6v3=t6v3
2022-09-22/httprequest0006.txt
0 0<br>
0 1<br>
1 0<br>
1 0<br>
1 1<br>
3 7<br>
0 0<br>
0 1<br>
1 0<br>
1 0<br>
1 1<br>
3 7<br>
<br><br>

0 1<br>
1 0<br>
3 7<br>
0 1<br>
1 0<br>
3 7<br>
<br><br>

0 0 0 1<br>
0 0 0 1<br>
0 1 0 1<br>
0 1 0 1<br>
1 0 1 0<br>
1 0 1 0<br>
1 0 1 0<br>
1 0 1 0<br>
1 1 1 0<br>
1 1 1 0<br>
3 7 3 7<br>
3 7 3 7<br>
0 0 0 1<br>
0 0 0 1<br>
0 1 0 1<br>
0 1 0 1<br>
1 0 1 0<br>
1 0 1 0<br>
1 0 1 0<br>
1 0 1 0<br>
1 1 1 0<br>
1 1 1 0<br>
3 7 3 7<br>
3 7 3 7<br>
<br><br>

2022-09-22/output0006_01.txt
9<br>
12<br>
0<br>
2<br>
15<br>
18<br>
29<br>
37<br>
4<br>
41<br>
5<br>
8<br>
22<br>
61<br>
7<br>
3<br>
11<br>
50<br>
44<br>
10<br>
14<br>
54<br>
1<br>
24<br>
19<br>
59<br>
13<br>
35<br>
23<br>
26<br>
57<br>
34<br>
6<br>
25<br>
53<br>
40<br>
36<br>
<br><br>

9<br>
12<br>
0<br>
2<br>
15<br>
18<br>
29<br>
37<br>
4<br>
41<br>
5<br>
8<br>
22<br>
61<br>
7<br>
3<br>
11<br>
50<br>
44<br>
10<br>
14<br>
54<br>
1<br>
24<br>
19<br>
59<br>
13<br>
35<br>
23<br>
26<br>
57<br>
34<br>
6<br>
25<br>
53<br>
40<br>
36<br>
<br><br>

<br><br>

9<br>
12<br>
0<br>
2<br>
15<br>
18<br>
29<br>
37<br>
4<br>
41<br>
5<br>
8<br>
22<br>
61<br>
7<br>
3<br>
11<br>
50<br>
44<br>
10<br>
14<br>
54<br>
1<br>
24<br>
19<br>
59<br>
13<br>
35<br>
23<br>
26<br>
57<br>
34<br>
6<br>
25<br>
53<br>
40<br>
36<br>
<br><br>

9<br>
12<br>
0<br>
2<br>
15<br>
18<br>
29<br>
37<br>
4<br>
41<br>
5<br>
8<br>
22<br>
61<br>
7<br>
3<br>
11<br>
50<br>
44<br>
10<br>
14<br>
54<br>
1<br>
24<br>
19<br>
59<br>
13<br>
35<br>
23<br>
26<br>
57<br>
34<br>
6<br>
25<br>
53<br>
40<br>
36<br>
<br><br>

<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
18<br>
19<br>
22<br>
23<br>
24<br>
25<br>
26<br>
29<br>
34<br>
35<br>
36<br>
37<br>
40<br>
41<br>
44<br>
50<br>
53<br>
54<br>
57<br>
59<br>
61<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
18<br>
19<br>
22<br>
23<br>
24<br>
25<br>
26<br>
29<br>
34<br>
35<br>
36<br>
37<br>
40<br>
41<br>
44<br>
50<br>
53<br>
54<br>
57<br>
59<br>
61<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
18<br>
19<br>
22<br>
23<br>
24<br>
25<br>
26<br>
29<br>
34<br>
35<br>
36<br>
37<br>
40<br>
41<br>
44<br>
50<br>
53<br>
54<br>
57<br>
59<br>
61<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
18<br>
19<br>
22<br>
23<br>
24<br>
25<br>
26<br>
29<br>
34<br>
35<br>
36<br>
37<br>
40<br>
41<br>
44<br>
50<br>
53<br>
54<br>
57<br>
59<br>
61<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
18<br>
19<br>
22<br>
23<br>
24<br>
25<br>
26<br>
29<br>
34<br>
35<br>
36<br>
37<br>
40<br>
41<br>
44<br>
50<br>
53<br>
54<br>
57<br>
59<br>
61<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
18<br>
19<br>
22<br>
23<br>
24<br>
25<br>
26<br>
29<br>
34<br>
35<br>
36<br>
37<br>
40<br>
41<br>
44<br>
50<br>
53<br>
54<br>
57<br>
59<br>
61<br>
<br><br>

2022-09-22/output0006_03.txt
<?php
include ("/home/david/db_settings.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE q6v3";
\$db->query (\$sql);

\$sql = "USE q6v3";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x INTEGER); CREATE TABLE b (x INTEGER); CREATE TABLE c (x INTEGER)";
\$db->query (\$sql);

for (\$i = 0;  \$i < 12;  \$i++) {
    \$sql = "INSERT INTO a (x) VALUES (" . rand () % 16 . "); ";
    \$sql .= "INSERT INTO a (x) VALUES (" . rand () % 64 . "); ";
    \$sql .= "INSERT INTO a (x) VALUES (" . rand () % 32 . "); ";
    \$db->query (\$sql);
}

\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";
\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x
                INTERSECT
            SELECT x FROM c
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x
                UNION
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";



\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM b
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x
                UNION
            SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM b) x
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";




\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM a
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM a) x
                UNION
            SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM a) x
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$db = null;
?>
2022-09-22/quantity0006.php
<?php
include ("/home/david/db_settings.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE t6v3";
\$db->query (\$sql);

\$sql = "USE t6v3";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (h1 INTEGER, h2 INTEGER); CREATE TABLE b (g1 INTEGER, g2 INTEGER)";
\$db->query (\$sql);

\$sql = "INSERT INTO a (h1, h2) VALUES (0, 0); INSERT INTO a (h1, h2) VALUES (0, 1); INSERT INTO a (h1, h2) VALUES (1, 0); INSERT INTO a (h1, h2) VALUES (1, 0); INSERT INTO a (h1, h2) VALUES (1, 1); INSERT INTO a (h1, h2) VALUES (3, 7); INSERT INTO b (g1, g2) VALUES (0, 1); INSERT INTO b (g1, g2) VALUES (1, 0); INSERT INTO b (g1, g2) VALUES (3, 7)";
\$db->query (\$sql);

\$sql = "SELECT * FROM a";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT * FROM b";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT * FROM a INNER JOIN b ON a.h1 = b.g1";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . " " . \$row [2] . " " . \$row [3] . "<br>n";
echo "<br><br>nn";

\$db = null;
?>
2022-09-22/test0006.php
<?php
session_start ();
?>

<form method="POST" action="./form0007.php">
<input type="text" name="t7v3"></input>
<input type="submit">
</form>

<?php
echo session_id () . "<br>n";

setcookie ("c7v3", "c7v3", time () + 1200);

echo htmlentities (\$_COOKIE ["c7v3"]) . "<br>n";
echo htmlentities (\$_COOKIE ["c7v3a"]) . "<br>n";
echo htmlentities (\$_POST ["t7v3"]) . "<br>n";

session_destroy ();
?>
2022-09-23/form0007.php
POST http://localhost/form0007.php HTTP/1.1
host: localhost
Cookie: c7v3a=c7v3a
Content-Length: 9
Content-Type: application/x-www-form-urlencoded

t7v3=t7v3
2022-09-23/httprequest0007.txt
2 2<br>
2 3<br>
2 4<br>
2 5<br>
5 3<br>
<br><br>

2 2<br>
2 3<br>
2 4<br>
<br><br>

2 2 2 4<br>
2 2 2 3<br>
2 2 2 2<br>
2 3 2 4<br>
2 3 2 3<br>
2 3 2 2<br>
2 4 2 4<br>
2 4 2 3<br>
2 4 2 2<br>
2 5 2 4<br>
2 5 2 3<br>
2 5 2 2<br>
<br><br>

2022-09-23/output0007_01.txt
15<br>
21<br>
28<br>
0<br>
11<br>
4<br>
3<br>
14<br>
5<br>
26<br>
19<br>
25<br>
7<br>
16<br>
10<br>
12<br>
8<br>
9<br>
1<br>
13<br>
2<br>
<br><br>

15<br>
21<br>
28<br>
0<br>
11<br>
4<br>
3<br>
14<br>
5<br>
26<br>
19<br>
25<br>
7<br>
16<br>
44<br>
6<br>
43<br>
56<br>
46<br>
9<br>
22<br>
48<br>
57<br>
59<br>
49<br>
1<br>
<br><br>

10<br>
12<br>
8<br>
14<br>
7<br>
9<br>
15<br>
1<br>
13<br>
2<br>
4<br>
44<br>
6<br>
43<br>
56<br>
46<br>
22<br>
28<br>
48<br>
57<br>
59<br>
5<br>
49<br>
<br><br>

15<br>
21<br>
28<br>
0<br>
11<br>
4<br>
3<br>
14<br>
5<br>
26<br>
19<br>
25<br>
7<br>
16<br>
10<br>
12<br>
8<br>
9<br>
1<br>
13<br>
2<br>
<br><br>

15<br>
21<br>
28<br>
0<br>
11<br>
4<br>
3<br>
14<br>
5<br>
26<br>
19<br>
25<br>
7<br>
16<br>
44<br>
6<br>
43<br>
56<br>
46<br>
9<br>
22<br>
48<br>
57<br>
59<br>
49<br>
1<br>
<br><br>

10<br>
12<br>
8<br>
14<br>
7<br>
9<br>
15<br>
1<br>
13<br>
2<br>
4<br>
44<br>
6<br>
43<br>
56<br>
46<br>
22<br>
28<br>
48<br>
57<br>
59<br>
5<br>
49<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
16<br>
19<br>
21<br>
22<br>
25<br>
26<br>
28<br>
43<br>
44<br>
46<br>
48<br>
49<br>
56<br>
57<br>
59<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
16<br>
19<br>
21<br>
22<br>
25<br>
26<br>
28<br>
43<br>
44<br>
46<br>
48<br>
49<br>
56<br>
57<br>
59<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
16<br>
19<br>
21<br>
22<br>
25<br>
26<br>
28<br>
43<br>
44<br>
46<br>
48<br>
49<br>
56<br>
57<br>
59<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
16<br>
19<br>
21<br>
22<br>
25<br>
26<br>
28<br>
43<br>
44<br>
46<br>
48<br>
49<br>
56<br>
57<br>
59<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
16<br>
19<br>
21<br>
22<br>
25<br>
26<br>
28<br>
43<br>
44<br>
46<br>
48<br>
49<br>
56<br>
57<br>
59<br>
<br><br>

0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
16<br>
19<br>
21<br>
22<br>
25<br>
26<br>
28<br>
43<br>
44<br>
46<br>
48<br>
49<br>
56<br>
57<br>
59<br>
<br><br>

2022-09-23/output0007_03.txt
<?php
include ("/home/david/db_settings.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE q7v3";
\$db->query (\$sql);

\$sql = "USE q7v3";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x INTEGER); CREATE TABLE b (x INTEGER); CREATE TABLE c (x INTEGER)";
\$db->query (\$sql);

for (\$i = 0;  \$i < 16;  \$i++) {
    \$sql = "INSERT INTO a (x) VALUES (" . rand () % 32 . "); ";
    \$sql .= "INSERT INTO b (x) VALUES (" . rand () % 16 . "); ";
    \$sql .= "INSERT INTO c (x) VALUES (" . rand () % 64 . "); ";
    \$db->query (\$sql);
}

\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";
\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";

\$sql = "SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x
                INTERSECT
            SELECT x FROM c
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x
                UNION
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) X
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";



\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM b
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x
                UNION
            SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM b) X
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";



\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM a
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM a) x
                UNION
            SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM a) X
    ) x ORDER BY x";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . "<br>n";
echo "<br><br>nn";


\$db = null;
?>
2022-09-23/quantity0007.php
<?php
include ("/home/david/db_settings.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE t7v3";
\$db->query (\$sql);

\$sql = "USE t7v3";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x1 INTEGER, x2 INTEGER); CREATE TABLE b (y1 INTEGER, y2 INTEGER)";
\$db->query (\$sql);

\$sql = "INSERT INTO a (x1, x2) VALUES (2, 2); INSERT INTO a (x1, x2) VALUES (2, 3); INSERT INTO a (x1, x2) VALUES (2, 4); INSERT INTO a (x1, x2) VALUES (2, 5); INSERT INTO a (x1, x2) VALUES (5, 3); INSERT INTO b (y1, y2) VALUES (2, 2); INSERT INTO b (y1, y2) VALUES (2, 3); INSERT INTO b (y1, y2) VALUES (2, 4)";
\$db->query (\$sql);

\$sql = "SELECT * FROM a";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT * FROM b";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . "<br>n";
echo "<br><br>nn";


\$sql = "SELECT * FROM a INNER JOIN b ON a.x1 = b.y1";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt->fetch ())
    echo \$row [0] . " " . \$row [1] . " " . \$row [2] . " " . \$row [3] . "<br>n";
echo "<br><br>nn";

\$db = null;
?>
2022-09-23/test0007.php

2022-09-26/test0008.php
#!/bin/bash

rm all.txt

l=\$(ls)

for s in \$l
do
    if [ -d \$s ]
    then
        k=\$(ls \$s/*)
        for t in \$k
        do
            cat "\$t" >> all.txt
            echo "\$t" >> all.txt
        done
    else
        cat "\$s" >> all.txt
        echo "\$s" >> all.txt
    fi
done
all.sh