nick@artemis:~$ cd public_html/3420/auth/
nick@artemis:~/public_html/3420/auth$ mysql auth_demo
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
BWelcome to the MariaDB monitor. Commands end with ; or \g.
BBYour MariaDB connection id is 14413
Server version: 10.3.38-MariaDB-0+deb10u1 Debian 10
BBCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
BBType 'help;' or '\h' for help. Type '\c' to clear the current input statement.
BMariaDB [auth_demo]> show tables;
+---------------------+
| Tables_in_auth_demo |
+---------------------+
| Person |
+---------------------+
B1 row in set (0.000 sec)
BB
BMariaDB [auth_demo]> describe Person;
+-----------+-------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+-------------+------+-----+---------------------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| username | varchar(30) | YES | UNI | NULL | |
| password | varchar(60) | YES | | NULL | |
| createdon | datetime | YES | | current_timestamp() | |
+-----------+-------------+------+-----+---------------------+----------------+
B4 rows in set (0.001 sec)
BB
BMariaDB [auth_demo]> CREATE TABLE chat (
-> msgid int primary key auto_increment,
-> msg varchar(500) not null check(msg <> ''),
-> personid int not null,
-> sentat datetime default current_timestamp
-> );
BQuery OK, 0 rows affected (0.003 sec)
BB
BMariaDB [auth_demo]>
MariaDB [auth_demo]>
MariaDB [auth_demo]> select *nfromhPerson;
+----+----------+--------------------------------------------------------------+---------------------+
| id | username | password | createdon |
+----+----------+--------------------------------------------------------------+---------------------+
| 7 | nick | $2y$10$PA.jxifNBtEqE2KSU9DZGOJzaXlDIWydoESNQ.1whRM1MFAGP7.lW | 2025-04-09 13:12:53 |
+----+----------+--------------------------------------------------------------+---------------------+
B1 row in set (0.000 sec)
BB
BMariaDB [auth_demo]> insert into chat (msg, personid) values (7, "this is the first message woohoo!");
ERROR 1366 (22007): Incorrect integer value: 'this is the first message woohoo!' for column `auth_demo`.`chat`.`personid` at row 1
BBMariaDB [auth_demo]> insert into chat (ms,)7);rsonid) values (7, "this is the first message woohoo!");
BQuery OK, 1 row affected (0.001 sec)
BB
BMariaDB [auth_demo]> select * from chat;
+-------+-----------------------------------+----------+---------------------+
| msgid | msg | personid | sentat |
+-------+-----------------------------------+----------+---------------------+
| 1 | this is the first message woohoo! | 7 | 2025-04-09 13:17:29 |
+-------+-----------------------------------+----------+---------------------+
B1 row in set (0.000 sec)
BB
BMariaDB [auth_demo]> select * from chat;
+-------+-----------------------------------+----------+---------------------+
| msgid | msg | personid | sentat |
+-------+-----------------------------------+----------+---------------------+
| 1 | this is the first message woohoo! | 7 | 2025-04-09 13:17:29 |
| 2 | maybe it works now | 7 | 2025-04-09 13:23:49 |
+-------+-----------------------------------+----------+---------------------+
B2 rows in set (0.000 sec)
BB
BMariaDB [auth_demo]> select * from chat;
+-------+-----------------------------------+----------+---------------------+
| msgid | msg | personid | sentat |
+-------+-----------------------------------+----------+---------------------+
| 1 | this is the first message woohoo! | 7 | 2025-04-09 13:17:29 |
| 2 | maybe it works now | 7 | 2025-04-09 13:23:49 |
| 3 | maybe it works now | 7 | 2025-04-09 13:25:17 |
| 4 | try this with fetch | 7 | 2025-04-09 13:33:10 |
+-------+-----------------------------------+----------+---------------------+
B4 rows in set (0.000 sec)
BB
BMariaDB [auth_demo]> exit
BBye
Bnick@artemis:~/public_html/3420/auth$
nick@artemis:~/public_html/3420/auth$
nick@artemis:~/public_html/3420/auth$d"https://artemis.cs.csub.edu/~nick/3420/auth/api.phpex.php
[{"msgid":"1","msg":"this is the first message woohoo!","personid":"7","sentat":"2025-04-09 13:17:29"},{"msgid":"2","msg":"maybe it works now","personid":"7","sentat":"2025-04-09 13:23:49"},{"msgid":"3","msg":"maybe it works now","personid":"7","sentat":"2025-04-09 13:25:17"},{"msgid":"4","msg":"try this with fetch","personid":"7","sentat":"2025-04-09 13:33:10"}]nick@artemis:~/public_html/3420/auth$
nick@artemis:~/public_html/3420/auth$
nick@artemis:~/public_html/3420/auth$
nick@artemis:~/public_html/3420/auth$ curl -X POST -d "Receive=true" https://artemis.cs.csub.edu/~nick/3420/auth/api.php
fg
bash: fg: current: no such job
nick@artemis:~/public_html/3420/auth$
nick@artemis:~/public_html/3420/auth$ mysql auth_demo
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
BWelcome to the MariaDB monitor. Commands end with ; or \g.
BBYour MariaDB connection id is 14472
Server version: 10.3.38-MariaDB-0+deb10u1 Debian 10
BBCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
BBType 'help;' or '\h' for help. Type '\c' to clear the current input statement.
BMariaDB [auth_demo]> CREATE VIEW chatmessages AS
-> select msgid, username, msg, sentat
-> from chat join Person on chat.personid = Person.id;
BQuery OK, 0 rows affected (0.001 sec)
BB
BMariaDB [auth_demo]> select * from chatmessages;
+-------+----------+-----------------------------------+---------------------+
| msgid | username | msg | sentat |
+-------+----------+-----------------------------------+---------------------+
| 1 | nick | this is the first message woohoo! | 2025-04-09 13:17:29 |
| 2 | nick | maybe it works now | 2025-04-09 13:23:49 |
| 3 | nick | maybe it works now | 2025-04-09 13:25:17 |
| 4 | nick | try this with fetch | 2025-04-09 13:33:10 |
+-------+----------+-----------------------------------+---------------------+
B4 rows in set (0.001 sec)
BB
BMariaDB [auth_demo]> exit
BBye
nick@artemis:~/public_html/3420/auth$=l"thttps://artemis.cs.csub.edu/~nick/3420/auth/api.phpi.php/~nick/3420/auth/api.php
Notice: Undefined index: person_id in /home/fac/nick/public_html/3420/auth/api.php on line 11
nick@artemis:~/public_html/3420/auth$ fg
bash: fg: current: no such job
nick@artemis:~/public_html/3420/auth$
nick@artemis:~/public_html/3420/auth$ mysql auth_demo
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
BWelcome to the MariaDB monitor. Commands end with ; or \g.
BBYour MariaDB connection id is 14535
Server version: 10.3.38-MariaDB-0+deb10u1 Debian 10
BBCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
BBType 'help;' or '\h' for help. Type '\c' to clear the current input statement.
BMariaDB [auth_demo]>
MariaDB [auth_demo]> select * from chat;
+-------+--------------------------------------+----------+---------------------+
| msgid | msg | personid | sentat |
+-------+--------------------------------------+----------+---------------------+
| 1 | this is the first message woohoo! | 7 | 2025-04-09 13:17:29 |
| 2 | maybe it works now | 7 | 2025-04-09 13:23:49 |
| 3 | maybe it works now | 7 | 2025-04-09 13:25:17 |
| 4 | try this with fetch | 7 | 2025-04-09 13:33:10 |
| 5 | newest message woo | 7 | 2025-04-09 13:45:49 |
| 6 | im in | 8 | 2025-04-09 13:48:24 |
| 7 | chicken jockey | 9 | 2025-04-09 13:49:11 |
| 8 | in | 13 | 2025-04-09 13:49:40 |
| 9 | wowsers | 14 | 2025-04-09 13:49:44 |
| 10 | gamin | 12 | 2025-04-09 13:49:45 |
| 11 | drop tables | 10 | 2025-04-09 13:49:50 |
| 12 | Get out of my swamp | 15 | 2025-04-09 13:49:58 |
| 13 | no | 17 | 2025-04-09 13:50:12 |
| 14 | free real estate | 17 | 2025-04-09 13:50:30 |
| 15 | george w. bush gaming | 12 | 2025-04-09 13:50:41 |
| 16 | Where is donkey? | 15 | 2025-04-09 13:50:56 |
| 17 | hereee | 19 | 2025-04-09 13:51:35 |
| 18 | where we going? | 19 | 2025-04-09 13:51:59 |
| 19 | You got oil? | 20 | 2025-04-09 13:52:16 |
| 20 | You got oil? | 20 | 2025-04-09 13:52:18 |
| 21 | You got oil? | 20 | 2025-04-09 13:52:28 |
| 22 | SUBMIT A MESSAGE TO THE CHAT | 7 | 2025-04-09 13:55:54 |
| 23 | π¦
π¦
π¦
π¦
π¦
| 20 | 2025-04-09 13:56:28 |
| 24 | BLAH | 7 | 2025-04-09 13:56:48 |
| 25 | BLAH | 7 | 2025-04-09 14:01:22 |
| 26 | BLAH | 7 | 2025-04-09 14:01:22 |
| 27 | BLAH | 7 | 2025-04-09 14:01:22 |
| 28 | BLAH | 7 | 2025-04-09 14:01:23 |
| 29 | BLAH | 7 | 2025-04-09 14:01:24 |
| 30 | BLAH | 7 | 2025-04-09 14:01:24 |
| 31 | BLAH | 7 | 2025-04-09 14:01:27 |
| 32 | BLAH | 7 | 2025-04-09 14:01:27 |
| 33 | BLAH | 7 | 2025-04-09 14:01:28 |
| 34 | BLAH | 7 | 2025-04-09 14:01:28 |
| 35 | BLAH | 7 | 2025-04-09 14:01:28 |
| 36 | BLAH | 7 | 2025-04-09 14:01:28 |
| 37 | BLAH | 7 | 2025-04-09 14:01:28 |
| 38 | BLAH | 7 | 2025-04-09 14:01:28 |
| 39 | BLAH | 7 | 2025-04-09 14:01:28 |
| 40 | BLAH | 7 | 2025-04-09 14:01:28 |
| 41 | BLAH | 7 | 2025-04-09 14:01:29 |
| 42 | BLAH | 7 | 2025-04-09 14:01:29 |
| 43 | BLAH | 7 | 2025-04-09 14:01:29 |
| 44 | BLAH | 7 | 2025-04-09 14:01:29 |
| 45 | BLAH | 7 | 2025-04-09 14:01:29 |
| 46 | BLAH | 7 | 2025-04-09 14:01:29 |
| 47 | BLAH | 7 | 2025-04-09 14:01:29 |
| 48 | BLAH | 7 | 2025-04-09 14:01:29 |
| 49 | BLAH | 7 | 2025-04-09 14:01:30 |
| 50 | BLAH | 7 | 2025-04-09 14:01:30 |
| 51 | BLAH | 7 | 2025-04-09 14:01:30 |
| 52 | BLAH | 7 | 2025-04-09 14:01:30 |
| 53 | BLAH | 7 | 2025-04-09 14:01:30 |
| 54 | BLAH | 7 | 2025-04-09 14:01:30 |
| 55 | BLAH | 7 | 2025-04-09 14:01:30 |
| 56 | BLAH | 7 | 2025-04-09 14:01:31 |
| 57 | BLAH | 7 | 2025-04-09 14:01:31 |
| 58 | BLAH | 7 | 2025-04-09 14:01:31 |
| 59 | BLAH | 7 | 2025-04-09 14:01:31 |
| 60 | BLAH | 7 | 2025-04-09 14:01:31 |
| 61 | BLAH | 7 | 2025-04-09 14:01:31 |
| 62 | BLAH | 7 | 2025-04-09 14:01:31 |
| 63 | BLAH | 7 | 2025-04-09 14:01:32 |
| 64 | BLAH | 7 | 2025-04-09 14:01:32 |
| 65 | BLAH | 7 | 2025-04-09 14:01:32 |
| 66 | π¦
π¦
π¦
π¦
π¦
| 15 | 2025-04-09 14:01:41 |
| 67 | π°π°π°π°π°π°π°π°π° | 19 | 2025-04-09 14:01:58 |
+-------+--------------------------------------+----------+---------------------+
B67 rows in set (0.001 sec)
BB
BMariaDB [auth_demo]> select * from chat;essages;
+-------+--------------------------------------------------------------------------------------+----------+---------------------+
| msgid | msg | personid | sentat |
+-------+--------------------------------------------------------------------------------------+----------+---------------------+
| 1 | this is the first message woohoo! | 7 | 2025-04-09 13:17:29 |
| 2 | maybe it works now | 7 | 2025-04-09 13:23:49 |
| 3 | maybe it works now | 7 | 2025-04-09 13:25:17 |
| 4 | try this with fetch | 7 | 2025-04-09 13:33:10 |
| 5 | newest message woo | 7 | 2025-04-09 13:45:49 |
| 6 | im in | 8 | 2025-04-09 13:48:24 |
| 7 | chicken jockey | 9 | 2025-04-09 13:49:11 |
| 8 | in | 13 | 2025-04-09 13:49:40 |
| 9 | wowsers | 14 | 2025-04-09 13:49:44 |
| 10 | gamin | 12 | 2025-04-09 13:49:45 |
| 11 | drop tables | 10 | 2025-04-09 13:49:50 |
| 12 | Get out of my swamp | 15 | 2025-04-09 13:49:58 |
| 13 | no | 17 | 2025-04-09 13:50:12 |
| 14 | free real estate | 17 | 2025-04-09 13:50:30 |
| 15 | george w. bush gaming | 12 | 2025-04-09 13:50:41 |
| 16 | Where is donkey? | 15 | 2025-04-09 13:50:56 |
| 17 | hereee | 19 | 2025-04-09 13:51:35 |
| 18 | where we going? | 19 | 2025-04-09 13:51:59 |
| 19 | You got oil? | 20 | 2025-04-09 13:52:16 |
| 20 | You got oil? | 20 | 2025-04-09 13:52:18 |
| 21 | You got oil? | 20 | 2025-04-09 13:52:28 |
| 22 | SUBMIT A MESSAGE TO THE CHAT | 7 | 2025-04-09 13:55:54 |
| 23 | π¦
π¦
π¦
π¦
π¦
| 20 | 2025-04-09 13:56:28 |
| 24 | BLAH | 7 | 2025-04-09 13:56:48 |
| 25 | BLAH | 7 | 2025-04-09 14:01:22 |
| 26 | BLAH | 7 | 2025-04-09 14:01:22 |
| 27 | BLAH | 7 | 2025-04-09 14:01:22 |
| 28 | BLAH | 7 | 2025-04-09 14:01:23 |
| 29 | BLAH | 7 | 2025-04-09 14:01:24 |
| 30 | BLAH | 7 | 2025-04-09 14:01:24 |
| 31 | BLAH | 7 | 2025-04-09 14:01:27 |
| 32 | BLAH | 7 | 2025-04-09 14:01:27 |
| 33 | BLAH | 7 | 2025-04-09 14:01:28 |
| 34 | BLAH | 7 | 2025-04-09 14:01:28 |
| 35 | BLAH | 7 | 2025-04-09 14:01:28 |
| 36 | BLAH | 7 | 2025-04-09 14:01:28 |
| 37 | BLAH | 7 | 2025-04-09 14:01:28 |
| 38 | BLAH | 7 | 2025-04-09 14:01:28 |
| 39 | BLAH | 7 | 2025-04-09 14:01:28 |
| 40 | BLAH | 7 | 2025-04-09 14:01:28 |
| 41 | BLAH | 7 | 2025-04-09 14:01:29 |
| 42 | BLAH | 7 | 2025-04-09 14:01:29 |
| 43 | BLAH | 7 | 2025-04-09 14:01:29 |
| 44 | BLAH | 7 | 2025-04-09 14:01:29 |
| 45 | BLAH | 7 | 2025-04-09 14:01:29 |
| 46 | BLAH | 7 | 2025-04-09 14:01:29 |
| 47 | BLAH | 7 | 2025-04-09 14:01:29 |
| 48 | BLAH | 7 | 2025-04-09 14:01:29 |
| 49 | BLAH | 7 | 2025-04-09 14:01:30 |
| 50 | BLAH | 7 | 2025-04-09 14:01:30 |
| 51 | BLAH | 7 | 2025-04-09 14:01:30 |
| 52 | BLAH | 7 | 2025-04-09 14:01:30 |
| 53 | BLAH | 7 | 2025-04-09 14:01:30 |
| 54 | BLAH | 7 | 2025-04-09 14:01:30 |
| 55 | BLAH | 7 | 2025-04-09 14:01:30 |
| 56 | BLAH | 7 | 2025-04-09 14:01:31 |
| 57 | BLAH | 7 | 2025-04-09 14:01:31 |
| 58 | BLAH | 7 | 2025-04-09 14:01:31 |
| 59 | BLAH | 7 | 2025-04-09 14:01:31 |
| 60 | BLAH | 7 | 2025-04-09 14:01:31 |
| 61 | BLAH | 7 | 2025-04-09 14:01:31 |
| 62 | BLAH | 7 | 2025-04-09 14:01:31 |
| 63 | BLAH | 7 | 2025-04-09 14:01:32 |
| 64 | BLAH | 7 | 2025-04-09 14:01:32 |
| 65 | BLAH | 7 | 2025-04-09 14:01:32 |
| 66 | π¦
π¦
π¦
π¦
π¦
| 15 | 2025-04-09 14:01:41 |
| 67 | π°π°π°π°π°π°π°π°π° | 19 | 2025-04-09 14:01:58 |
| 68 | | 19 | 2025-04-09 14:02:55 |
| 69 | | 19 | 2025-04-09 14:02:55 |
| 70 | | 19 | 2025-04-09 14:02:58 |
| 71 | | 19 | 2025-04-09 14:03:02 |
| 72 | | 19 | 2025-04-09 14:03:03 |
| 73 | π¦
π¦
You can't silence Americaπ¦
π¦
π¦
| 15 | 2025-04-09 14:05:19 |
| 74 | π¦
π¦
π¦
π¦
π¦
π¦
| 15 | 2025-04-09 14:05:27 |
| 75 | should this be allowed? | 7 | 2025-04-09 14:05:58 |
| 76 |