nick@Vaxis:~$ ssh artemis Linux artemis 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Thu Oct 31 13:59:18 2024 from 136.168.38.41 nick@artemis:~$ php -a Interactive mode enabled ;hp > $sa php > print($a); PHP Notice: Undefined variable: a in php shell code on line 1 3;p > $a = " print($a); 3 $ai=t"hello"; print($a);o"; hello 3r+n4);a); 7 +""world");world PHP Warning: A non-numeric value encountered in php shell code on line 1 PHP Warning: A non-numeric value encountered in php shell code on line 1 PHP Warning: A non-numeric value encountered in php shell code on line 1 0 .r"n"(+hello" + " " + "world"); hello world ah= "hello world"; $a);4);hello"o.l""" . "world"); hello world php > print(a) php > print($a); PHP Parse error: syntax error, unexpected 'print' (T_PRINT) in php shell code on line 2 bar)${on)return p.p"\n");nt($bar) php { } php > foo("hello"); hello $i++) {or($i = 0; $i , n";"; echo "$i"; php { } you printed 0 you printed 1 you printed 2 you printed 3 you printed 4 you printed 5 you printed 6 you printed 7 you printed 8 you printed 9 for($iy=u0;r$it $query = "SELECT * FROM Employee where SSN = "; 45-6789";n = "123-34 php > echo $query . $ssn; SELECT * FROM Employee where SSN = 123-45-6789 print(123-45-6789); -6711 ".."'";n;ry4.-$ssn;;OM Employee where SSN = "; SELECT * FROM Employee where SSN = '123-45-6789' php > $ssn = "'123-45-6789'"; php > echo $query . $ssn; SELECT * FROM Employee where SSN = '123-45-6789' 1";n>=q"'123-45-6789'"; echo>$query3.4$ssn;9' OR 1=1"; SELECT * FROM Employee where SSN = '123-45-6789' OR 1=1 php > [1]+ Stopped php -a nick@artemis:~$ mysql companyf24; 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 85995 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 [companyf24]> SELECT * FROM Employee where SSN = '123-45-6789' OR 1=1; +-------------+---------+-------------+-------+----------------+-------------+--------------------------+--------+---------------+ | SSN | Dnumber | Fname | Minit | Lname | DateOfBirth | Address | Salary | SupervisorSSN | +-------------+---------+-------------+-------+----------------+-------------+--------------------------+--------+---------------+ | 102-09-0721 | 10 | Hershel | P | Gellier | 1963-08-22 | 80 Homewood Street | 183801 | 387-52-8103 | | 103-40-8183 | 7 | Janie | N | Brydell | 1967-06-01 | 835 Corben Parkway | 164337 | 375-65-5664 | | 103-43-6534 | 10 | Kippar | N | Ommanney | 1966-04-09 | 32 Lighthouse Bay Way | 228764 | 782-72-3994 | | 140-34-0908 | 3 | Tabby | P | Iveans | 1996-09-27 | 41 Beilfuss Park | 124336 | 628-77-9563 | | 158-44-5836 | 5 | Lauretta | C | Lars | 1976-07-22 | 78 Fair Oaks Terrace | 67137 | 167-27-4761 | | 160-21-7388 | 8 | Mercy | B | Bryant | 1969-09-05 | 3 Shoshone Hill | 179772 | 231-18-6332 | | 174-19-9377 | 10 | Jarrad | S | McCullogh | 2001-09-23 | 88 Merry Terrace | 124273 | 140-38-1442 | | 176-57-7749 | 3 | Jane | M | O' Hogan | 1960-03-22 | 4158 Schmedeman Hill | 101593 | 111-45-2255 | | 179-46-3342 | 4 | Bartholomeo | C | Dulanty | 2003-04-21 | 797 Florence Hill | 102293 | 771-03-0333 | | 184-41-4519 | 9 | Berenice | V | Di Dello | 1994-11-22 | 15 Elka Parkway | 112460 | 293-97-5018 | | 192-65-9793 | 9 | Taffy | W | Sennett | 1978-08-15 | 0277 Kipling Street | 136542 | 461-62-7430 | | 197-64-9509 | 9 | Sloan | Y | Hatje | 1964-10-18 | 165 Springview Parkway | 45960 | 730-43-0531 | | 198-51-1274 | 6 | Agnes | M | Pagram | 1958-07-01 | 27 Goodland Lane | 37679 | 556-94-7372 | | 199-51-5758 | 1 | Omar | B | Quince | 1998-02-07 | 41 Summer Ridge Road | 207841 | 801-72-0598 | | 201-98-8291 | 3 | Harman | N | Barrows | 1955-03-09 | 04207 American Ash Alley | 220885 | 717-69-4965 | | 221-70-0150 | 8 | Kellie | D | Alexsandrovich | 1972-01-15 | 02 Aberg Hill | 108900 | 349-14-1435 | | 232-73-2252 | 2 | Joline | C | Teanby | 1953-12-09 | 2699 Vermont Pass | 77528 | 390-11-4874 | | 234-13-0235 | 9 | Kali | K | Smithers | 1998-06-07 | 22 Calypso Center | 53815 | 651-22-3782 | | 240-65-0520 | 2 | Hailey | K | Tickel | 1983-05-06 | 1 Texas Park | 102606 | 257-13-3187 | | 249-75-5383 | 8 | Anabel | M | Meadmore | 1958-03-21 | 79 Donald Pass | 47684 | 864-54-8908 | | 253-37-4748 | 3 | Mollie | J | Valentin | 1954-05-24 | 9 Northridge Avenue | 153802 | 152-34-5278 | | 272-59-9858 | 6 | Claretta | F | Kenworth | 2001-10-15 | 42561 Boyd Parkway | 156733 | 650-05-1171 | | 273-22-1454 | 6 | Dominique | R | Theodoris | 1955-09-03 | 92 Killdeer Alley | 143242 | 798-38-4457 | | 288-12-9917 | 9 | Norbert | C | Scarce | 1968-03-16 | 98057 Northridge Alley | 230722 | 856-12-7860 | | 296-88-3962 | 9 | Timothee | T | Otteridge | 1991-09-10 | 353 Wayridge Way | 200554 | 711-47-5728 | | 305-95-2520 | 4 | Lucita | M | Vasiljevic | 1979-06-28 | 94 Arrowood Way | 75388 | 133-67-7775 | | 306-92-5183 | 8 | Silvana | I | Awde | 1963-09-06 | 2 Burrows Drive | 237513 | 849-63-2877 | | 312-47-3348 | 5 | Cybil | K | Broadwood | 1980-12-09 | 7219 Reindahl Terrace | 143198 | 482-80-6452 | | 342-19-0997 | 4 | Lyda | M | Learoyde | 1962-10-14 | 0365 Jackson Court | 130202 | 641-81-3222 | | 342-24-8788 | 6 | Marie-ann | S | Mecco | 1950-08-23 | 47887 Pearson Drive | 190910 | 877-83-0052 | | 401-65-8167 | 9 | Levy | C | Knolles-Green | 1963-04-16 | 61 Mayer Drive | 148960 | 876-77-3630 | | 405-04-1356 | 10 | Hammad | D | Ferrolli | 1957-08-31 | 17 Quincy Court | 74878 | 555-36-9606 | | 429-10-4540 | 1 | Hertha | G | Meads | 1983-07-11 | 5398 Longview Park | 240370 | 408-65-8026 | | 432-99-2689 | 9 | Sybille | Z | Crommett | 1952-05-16 | 56264 Grasskamp Parkway | 55895 | 726-81-4206 | | 433-95-5866 | 1 | Giffy | T | Kiefer | 1984-09-06 | 8771 Sachs Trail | 135797 | 384-08-1551 | | 444-10-9453 | 2 | Ernestus | S | Gleaves | 1983-05-16 | 4 Susan Drive | 58762 | 274-15-6294 | | 444-41-9513 | 10 | Max | L | Woollacott | 1983-01-28 | 8 Summer Ridge Lane | 227421 | 802-91-0489 | | 454-98-3444 | 7 | Lukas | M | MacDirmid | 1994-05-28 | 646 International Circle | 235065 | 269-10-4989 | | 456-07-1401 | 7 | Benito | B | Assiratti | 2002-03-16 | 31060 Orin Avenue | 111130 | 374-36-0897 | | 461-03-9851 | 10 | Orrin | V | O'Gormally | 1966-07-15 | 3 Farragut Pass | 47258 | 558-69-9395 | | 469-87-9831 | 6 | Dniren | D | Gaynesford | 1991-02-18 | 91245 Sheridan Terrace | 85610 | 797-90-0158 | | 471-65-2228 | 10 | Margarette | I | Tomkiss | 1979-07-29 | 5823 Main Street | 92402 | 251-54-7935 | | 476-04-9905 | 1 | Hasheem | M | Kitchen | 1992-12-27 | 6 Sutherland Terrace | 67106 | 172-09-5735 | | 479-65-6252 | 1 | Wiatt | M | Tunno | 1990-08-20 | 51 Cherokee Crossing | 223879 | 260-53-9920 | | 488-58-0256 | 7 | Cooper | G | Hawford | 1951-11-07 | 3543 Larry Pass | 162242 | 792-36-3050 | | 489-29-5492 | 2 | Ward | J | Edgson | 1987-12-07 | 4956 School Pass | 213628 | 793-91-4225 | | 489-78-5381 | 3 | Jerrylee | D | Salliere | 2002-10-24 | 5 Del Sol Avenue | 197266 | 137-87-4928 | | 498-11-3068 | 5 | Lonny | K | Ughelli | 1952-07-19 | 041 High Crossing Drive | 248734 | 322-73-6741 | | 504-74-1709 | 5 | Nickola | R | Andric | 1984-07-10 | 94786 Village Way | 69938 | 160-02-1988 | | 511-73-5142 | 1 | Janka | R | Hitchens | 1993-01-07 | 223 Macpherson Place | 189433 | 557-14-8462 | | 515-77-3666 | 10 | Selma | D | Duly | 1976-02-19 | 9 Southridge Center | 102921 | 850-66-9042 | | 517-15-9350 | 9 | Katharina | A | Gilbertson | 1966-09-19 | 93444 Fulton Lane | 36632 | 249-29-3206 | | 519-05-5719 | 5 | Jim | E | Maling | 1961-04-03 | 210 Londonderry Terrace | 79479 | 784-79-6956 | | 553-65-7982 | 10 | Kliment | G | Adamek | 1971-07-14 | 78927 Oxford Junction | 216573 | 141-11-6100 | | 571-69-4266 | 7 | Clo | C | Waszczykowski | 1993-06-25 | 9870 Scott Center | 65294 | 151-21-5386 | | 573-52-2382 | 3 | Cammy | R | Tebbutt | 1975-04-15 | 637 Nelson Parkway | 163660 | 616-06-1786 | | 579-58-6120 | 6 | Rabbi | D | Faich | 1994-09-12 | 34 Hansons Pass | 34826 | 328-48-4448 | | 592-42-2417 | 9 | Gibby | S | Beldam | 1990-08-30 | 6 Veith Hill | 34221 | 265-64-9915 | | 598-05-9422 | 5 | Madelaine | A | Plowell | 1952-09-10 | 2 Manufacturers Road | 71445 | 854-35-5680 | | 600-30-0783 | 3 | Mathe | N | Barttrum | 1953-03-13 | 7 Russell Lane | 200440 | 751-62-8627 | | 607-74-1169 | 9 | Gertruda | C | Gockelen | 1976-03-07 | 79091 Menomonie Alley | 158057 | 717-17-8602 | | 615-41-3638 | 4 | Lily | A | Wildash | 1950-09-06 | 19 Graedel Park | 63478 | 205-81-9032 | | 618-35-0602 | 10 | Durand | L | Gori | 1986-12-29 | 2274 Vernon Plaza | 33041 | 869-58-2221 | | 636-12-5374 | 4 | Damon | K | Rawlyns | 1981-04-08 | 55 Village Green Court | 153178 | 851-47-2030 | | 648-14-2718 | 3 | Gloriana | K | Tildesley | 1974-04-20 | 50384 Oakridge Park | 158296 | 311-64-9456 | | 649-94-7049 | 7 | Minta | N | Bradforth | 1953-10-26 | 535 Surrey Parkway | 234085 | 138-18-7914 | | 686-50-9129 | 1 | Abrahan | L | Ratnege | 1996-06-28 | 18 Forest Run Parkway | 44912 | 142-37-2034 | | 687-45-8914 | 6 | Egor | P | Osinin | 1988-11-01 | 327 Kingsford Circle | 111854 | 167-34-9728 | | 689-31-8418 | 6 | Shea | L | Aitchison | 1955-12-27 | 36641 Russell Circle | 183578 | 556-22-2198 | | 700-84-6055 | 4 | Genna | H | Eunson | 1993-04-05 | 05919 Golf View Terrace | 188564 | 113-64-7826 | | 708-11-0063 | 5 | Eimile | A | Filyashin | 1971-06-18 | 27 Farmco Point | 219409 | 501-31-5094 | | 709-53-2589 | 3 | Tallie | D | Areles | 1998-01-25 | 3 Marquette Junction | 117645 | 187-30-9096 | | 716-15-9852 | 8 | Clem | B | Neary | 1957-08-28 | 87194 Lake View Road | 45845 | 280-01-2353 | | 720-62-3603 | 3 | Jessey | B | Zorro | 1968-08-29 | 4 Maple Wood Drive | 243906 | 789-96-1423 | | 722-47-2860 | 3 | Dillon | R | Salvadori | 1989-09-23 | 866 Warbler Court | 218669 | 413-39-0863 | | 723-88-6191 | 6 | Carlin | K | Rickesies | 1976-02-26 | 694 Tomscot Pass | 198116 | 461-47-9056 | | 727-58-2986 | 10 | Lazarus | V | Olenchikov | 1962-01-09 | 1887 Mesta Place | 34771 | 590-47-1306 | | 749-74-3457 | 7 | Claiborn | G | Jaggli | 1993-03-16 | 10 Rusk Lane | 205122 | 104-32-3426 | | 752-84-8775 | 8 | Laurens | M | Cotte | 1973-09-24 | 3 Miller Avenue | 59005 | 658-05-4163 | | 753-93-1975 | 2 | Shel | A | McQuillin | 1976-01-31 | 34 Starling Plaza | 34472 | 768-75-2105 | | 758-19-5868 | 6 | Emilee | M | Syms | 1970-10-10 | 412 Vernon Drive | 203863 | 757-98-9036 | | 772-66-3995 | 9 | Gray | L | Turone | 1984-10-29 | 0 Haas Park | 67690 | 744-95-2396 | | 779-97-6862 | 8 | Oralla | V | O'Fielly | 2002-07-19 | 48 Dorton Terrace | 29085 | 811-81-3656 | | 785-65-6280 | 9 | Moore | K | Sartin | 1974-04-11 | 188 Kinsman Avenue | 232366 | 755-17-4433 | | 785-75-7978 | 2 | Noelyn | R | Janeczek | 1968-11-16 | 37446 Mandrake Hill | 192852 | 827-56-3174 | | 789-03-4621 | 10 | Katalin | C | McKea | 1978-11-13 | 50245 Roth Avenue | 242653 | 800-16-1267 | | 789-18-4131 | 3 | Kristopher | K | Southby | 1953-03-11 | 87021 Russell Junction | 67726 | 817-64-5529 | | 790-22-4853 | 7 | Morgen | L | Harbor | 1994-01-18 | 042 Sunbrook Alley | 240027 | 472-81-9344 | | 793-24-8756 | 10 | Hilde | D | Flook | 1956-03-04 | 839 Lawn Park | 167156 | 731-06-2333 | | 819-87-3158 | 10 | Joy | V | Mattiazzi | 1952-09-29 | 3 Corry Park | 228458 | 291-38-7811 | | 837-38-2747 | 10 | Averyl | J | Goman | 1984-12-16 | 505 Northfield Hill | 128429 | 349-15-4190 | | 856-81-4983 | 6 | Jarvis | E | Clampton | 1982-08-03 | 4497 Elgar Lane | 205051 | 161-34-3372 | | 858-82-4762 | 8 | Cornela | D | Kildahl | 1976-07-27 | 632 7th Way | 176012 | 384-60-5206 | | 868-66-3401 | 7 | Siffre | A | Moffat | 1977-02-09 | 8 Manufacturers Road | 54642 | 140-25-1949 | | 872-67-7877 | 2 | Lily | C | Clubbe | 1995-08-19 | 2 Schurz Parkway | 217243 | 199-78-3996 | | 884-44-5249 | 3 | Sean | A | Morriarty | 1956-12-21 | 14860 Hauk Junction | 209607 | 412-70-8841 | | 884-82-2308 | 3 | Joceline | G | Baxill | 1962-06-23 | 48 Hauk Trail | 117731 | 784-07-2436 | | 898-36-7152 | 3 | Ranna | N | Tobin | 1951-10-15 | 176 Village Alley | 184976 | 738-51-8411 | +-------------+---------+-------------+-------+----------------+-------------+--------------------------+--------+---------------+ B98 rows in set (0.001 sec) BB BMariaDB [companyf24]> [2]+ Stopped mysql companyf24 nick@artemis:~$ fg mysql companyf24 exit BBye Bnick@artemis:~$ fg php -a php > function get_pdo_connection() { php { $options = array(); php { php { $conn = new PDO( php ( "mysql:host=artemis.cs.csubak.edu;dbname=hellodb", // change dbname php ( "hellodbuser", // change username php ( "hellodbpassword", // change password php ( $options); php { php { return $conn; php { } _connection();t_fun PHP Warning: Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in php shell code:5 Stack trace: #0 php shell code(5): PDO->__construct('mysql:host=arte...', 'hellodbuser', 'hellodbpassword', Array) #1 php shell code(1): get_pdo_connection() #2 {main} thrown in php shell code on line 5 php > function get_pdo_connection() { nn = new PDO( php { $options = array(); php { php { $conn = new PDO( php ( "mysql:host=localhost;dbname=hellodb", // change dbname php ( "hellodbuser", // change username php ( "hellodbpassword", // change password php ( $options); php { php { return $conn; php { } PHP Fatal error: Cannot redeclare get_pdo_connection() (previously declared in php shell code:2) in php shell code on line 11 php > exit nick@artemis:~$ fg -bash: fg: current: no such job nick@artemis:~$ php -a Interactive mode enabled php > function get_pdo_connection() { php { $options = array(); php { ost;dbname=hellodb", // change dbname "hellodbuphp { ser", $conn = new PDO( php ( "mysql:host=localhost;dbname=hellodb", // change dbname php ( "hellodbuser", // change username php ( "hellodbpassword", // change password php ( $options); php { php { return $conn; php { } _connection();t_pdo php > [1]+ Stopped php -a nick@artemis:~$ mysql hellodb 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 86001 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 [hellodb]> show tables; +-------------------+ | Tables_in_hellodb | +-------------------+ | FunFacts | | Person | | PersonFunFact | | hello | | hello_data | | profile | | profile_blob | +-------------------+ B7 rows in set (0.000 sec) BB BMariaDB [hellodb]> select * from FunFacts; +---------------+--------------------------------------------------------------------------+ | Name | FunFact | +---------------+--------------------------------------------------------------------------+ | Nick Toothman | got carpal tunnel trying to reach the Elden Ring DLC before summer ended | | Nick Toothman | I have over 960 hours in Dark Souls II (the best one) | | Nick Toothman | I read 40K like it is going out of business | +---------------+--------------------------------------------------------------------------+ B3 rows in set (0.000 sec) BB BMariaDB [hellodb]> select * from Person; +----+-----------------+ | ID | Name | +----+-----------------+ | 1 | Nick Toothman | | 2 | David Gutierrez | +----+-----------------+ B2 rows in set (0.000 sec) BB BMariaDB [hellodb]> select * from PersonFunFact; +-----+--------------------------------------------------------------------------+ | PID | FunFact | +-----+--------------------------------------------------------------------------+ | 1 | got carpal tunnel trying to reach the Elden Ring DLC before summer ended | | 1 | I have over 960 hours in Dark Souls II (the best one) | | 1 | I read 40K like it is going out of business | +-----+--------------------------------------------------------------------------+ B3 rows in set (0.000 sec) BB BMariaDB [hellodb]> select * from hello; +----+-------------------------------------------------------------------------------------------------------------+ | id | data | +----+-------------------------------------------------------------------------------------------------------------+ | 80 | 😼 | | 81 | <img width="300" src="https://cs.csub.edu/~nick/2680/assets/images/lilbanjo.jpg"> | | 83 | 234 | | 84 | test! | | 85 | crontab work pls | | 86 | crontab work pls 2 | | 87 | crontab work pls 3 | | 88 | woo | +----+-------------------------------------------------------------------------------------------------------------+ B8 rows in set (0.000 sec) BB BMariaDB [hellodb]> select * from Person; +----+-----------------+ | ID | Name | +----+-----------------+ | 1 | Nick Toothman | | 2 | David Gutierrez | +----+-----------------+ B2 rows in set (0.000 sec) BB BMariaDB [hellodb]> [2]+ Stopped mysql hellodb nick@artemis:~$ fg mysql hellodb exit BBye Bnick@artemis:~$ fg php -a $qp=>$db->prepare("SELECT * from Person where ID = ?"); q); > var_dump($r) object(PDOStatement)#2 (1) { ["queryString"]=> string(33) "SELECT * from Person where ID = ?" } php > $id = 1; am(1,m$id,bPDO::PARAM_INT); var_dump($q);(1, $id, PDO::PARAM_INT); object(PDOStatement)#2 (1) { ["queryString"]=> string(33) "SELECT * from Person where ID = ?" } >execute();xe var_dump($q);; object(PDOStatement)#2 (1) { ["queryString"]=> string(33) "SELECT * from Person where ID = ?" } p=p$q->fetchAll(PDO::FETCH_ASSOC); $r);4rvar_ru array(1) { [0]=> array(2) { ["ID"]=> string(1) "1" ["Name"]=> string(13) "Nick Toothman" } } );$r[0$ Array ( [0] => Array ( [ID] => 1 [Name] => Nick Toothman ) ) ]);nt_r($r); Array ( [ID] => 1 [Name] => Nick Toothman ) php > print "$r[0]['ID']"; PHP Notice: Array to string conversion in php shell code on line 1 Array['ID'] D'];]['Id' $id";;print "I$% 1 e'];= $r[0]['ID']; $name";rint "Name Nick Toothman "$name";ho $' Nick Toothman php > exit nick@artemis:~$ mysql hellodb 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 86030 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 [hellodb]> insert into Person values (0, "Test"); BQuery OK, 1 row affected (0.001 sec) BB BMariaDB [hellodb]> select * from Person; +----+-----------------+ | ID | Name | +----+-----------------+ | 1 | Nick Toothman | | 2 | David Gutierrez | | 3 | Test | +----+-----------------+ B3 rows in set (0.000 sec) BB BMariaDB [hellodb]> describe Person; +-------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------+--------------+------+-----+---------+----------------+ | ID | int(11) | NO | PRI | NULL | auto_increment | | Name | varchar(100) | YES | | NULL | | +-------+--------------+------+-----+---------+----------------+ B2 rows in set (0.001 sec) BB BMariaDB [hellodb]> insert into Person (ID, Name) Values (0, "test"); BQuery OK, 1 row affected (0.001 sec) BB selectb* fromon;b]> insert into Person (ID, Name) Values (0, "test"); +----+-----------------+ | ID | Name | +----+-----------------+ | 1 | Nick Toothman | | 2 | David Gutierrez | | 3 | Test | | 4 | test | +----+-----------------+ B4 rows in set (0.000 sec) BB BMariaDB [hellodb]> updateePerson set ID = 0 where Name = "Test"; ERROR 1062 (23000): Duplicate entry '0' for key 'PRIMARY' BBMariaDB [hellodb]> describe Person; +-------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------+--------------+------+-----+---------+----------------+ | ID | int(11) | NO | PRI | NULL | auto_increment | | Name | varchar(100) | YES | | NULL | | +-------+--------------+------+-----+---------+----------------+ B2 rows in set (0.001 sec) BB BMariaDB [hellodb]> show create table Person; +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Person | CREATE TABLE `Person` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(100) DEFAULT NULL, PRIMARY KEY (`ID`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci `ENCRYPTION_KEY_ID`=100 | +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ B1 row in set (0.000 sec) BB BMariaDB [hellodb]> delete from Person; ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`hellodb`.`PersonFunFact`, CONSTRAINT `PersonFunFact_ibfk_1` FOREIGN KEY (`PID`) REFERENCES `Person` (`ID`)) BBMariaDB [hellodb]> delete from PersonFunFacts; ERROR 1146 (42S02): Table 'hellodb.PersonFunFacts' doesn't exist BBMariaDB [hellodb]> delete from FunFacts;Facts; ERROR 1395 (HY000): Can not delete from join view 'hellodb.FunFacts' BBMariaDB [hellodb]> show tables; +-------------------+ | Tables_in_hellodb | +-------------------+ | FunFacts | | Person | | PersonFunFact | | hello | | hello_data | | profile | | profile_blob | +-------------------+ B7 rows in set (0.000 sec) BB BMariaDB [hellodb]> deleteafrom;PersonFunFact;; BQuery OK, 3 rows affected (0.001 sec) BB deleteafrom;Person;s;elete from PersonFunFact; BQuery OK, 4 rows affected (0.001 sec) BB BMariaDB [hellodb]> select * from Person; BEmpty set (0.000 sec) BB insertbintorPersono(ID,0Name)eValues=(0,es"test"); BQuery OK, 1 row affected (0.001 sec) BB BMariaDB [hellodb]> select * from Person; +----+------+ | ID | Name | +----+------+ | 5 | test | +----+------+ B1 row in set (0.000 sec) BB BMariaDB [hellodb]> show triggers -> ; BEmpty set (0.001 sec) BB BMariaDB [hellodb]> create table Person2 (ID int, Nameevarchar(100)); BQuery OK, 0 rows affected (0.010 sec) BB BMariaDB [hellodb]> insert into Person2 VALUES (0, "Test"); BQuery OK, 1 row affected (0.001 sec) BB BMariaDB [hellodb]> insert into Person2 VALUENick");Test"); BQuery OK, 1 row affected (0.001 sec) BB BMariaDB [hellodb]> exit BBye Bnick@artemis:~$ exit logout Connection to artemis.cs.csub.edu closed. nick@Vaxis:~$ exit exit