{"id":2303,"date":"2014-09-22T17:02:23","date_gmt":"2014-09-22T08:02:23","guid":{"rendered":"http:\/\/www.happyfam.or.kr\/ysoh\/?p=2303"},"modified":"2016-06-01T11:34:06","modified_gmt":"2016-06-01T02:34:06","slug":"webdbii-%ec%8b%a4%ec%8a%b5%ec%98%88%ec%a0%9c-%ec%86%8c%ec%8a%a4-4","status":"publish","type":"post","link":"https:\/\/www.happyfam.or.kr\/ysoh\/webdbii-%ec%8b%a4%ec%8a%b5%ec%98%88%ec%a0%9c-%ec%86%8c%ec%8a%a4-4\/","title":{"rendered":"WebDB(II) \uc2e4\uc2b5\uc608\uc81c \uc18c\uc2a4 #4"},"content":{"rendered":"<div id=\"attachment_2323\" style=\"width: 502px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-10.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2323\" data-attachment-id=\"2323\" data-permalink=\"https:\/\/www.happyfam.or.kr\/ysoh\/webdbii-%ec%8b%a4%ec%8a%b5%ec%98%88%ec%a0%9c-%ec%86%8c%ec%8a%a4-4\/examsql-10\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-10.png?fit=492%2C323&amp;ssl=1\" data-orig-size=\"492,323\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"examSQL-10\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-10.png?fit=492%2C323&amp;ssl=1\" class=\"wp-image-2323 size-full\" src=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-10.png?resize=492%2C323\" alt=\"examSQL-10\" width=\"492\" height=\"323\" srcset=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-10.png?w=492&amp;ssl=1 492w, https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-10.png?resize=300%2C196&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-10.png?resize=120%2C80&amp;ssl=1 120w\" sizes=\"auto, (max-width: 492px) 100vw, 492px\" \/><\/a><p id=\"caption-attachment-2323\" class=\"wp-caption-text\">\ud68c\uc6d0\ubaa9\ub85d \ucd9c\ub825\ud615\ud0dc<\/p><\/div>\n<pre class=\"wrap:true lang:php decode:true\" title=\"examSQL-10.php\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n    &lt;head&gt;\r\n        &lt;meta charset=\"UTF-8\"&gt;\r\n        &lt;style&gt;\r\n            h1 {text-align: center;}\r\n            table {margin: 0 auto;}\r\n        &lt;\/style&gt;\r\n        &lt;title&gt;examSQL-10.php&lt;\/title&gt;\r\n    &lt;\/head&gt;\r\n    &lt;body&gt;\r\n        &lt;h1&gt;\ud68c\uc6d0\ubaa9\ub85d&lt;\/h1&gt;\r\n        &lt;table&gt;\r\n            &lt;thead&gt;\r\n                &lt;tr&gt;\r\n                    &lt;th&gt;\uc21c\ubc88&lt;\/th&gt;\r\n                    &lt;th&gt;\uc544\uc774\ub514&lt;\/th&gt;\r\n                    &lt;th&gt;\uc131\uba85&lt;\/th&gt;\r\n                    &lt;th&gt;\ube44\ubc00\ubc88\ud638&lt;\/th&gt;\r\n                    &lt;th&gt;\uc774\uba54\uc77c&lt;\/th&gt;\r\n                    &lt;th&gt;\ub3d9\uc791&lt;\/th&gt;\r\n                &lt;\/tr&gt;\r\n            &lt;\/thead&gt;\r\n            &lt;tbody&gt;\r\n                &lt;tr&gt;\r\n                    &lt;td&gt;1&lt;\/td&gt;\r\n                    &lt;td&gt;hong&lt;\/td&gt;\r\n                    &lt;td&gt;\ud64d\uae38\ub3d9&lt;\/td&gt;\r\n                    &lt;td&gt;hong&lt;\/td&gt;\r\n                    &lt;td&gt;hong@nomail.plz&lt;\/td&gt;\r\n                    &lt;td&gt;\r\n                        &lt;a href=\".\/examSQL-14.php\"&gt;\uc0ad\uc81c&lt;\/a&gt;\r\n                        &lt;a href=\".\/examSQL-15.php\"&gt;\uc218\uc815&lt;\/a&gt;\r\n                    &lt;\/td&gt;\r\n                &lt;\/tr&gt;\r\n                &lt;tr&gt;\r\n                    &lt;td&gt;2&lt;\/td&gt;\r\n                    &lt;td&gt;yskim&lt;\/td&gt;\r\n                    &lt;td&gt;\uae40\uc601\uc0bc&lt;\/td&gt;\r\n                    &lt;td&gt;yskim&lt;\/td&gt;\r\n                    &lt;td&gt;yskim@nomail.plz&lt;\/td&gt;\r\n                    &lt;td&gt;\r\n                        &lt;a href=\"examSQL-14.php\"&gt;\uc0ad\uc81c&lt;\/a&gt;\r\n                        &lt;a href=\"examSQL-15.php\"&gt;\uc218\uc815&lt;\/a&gt;\r\n                    &lt;\/td&gt;\r\n                &lt;\/tr&gt;\r\n                &lt;tr&gt;\r\n                    &lt;td&gt;3&lt;\/td&gt;\r\n                    &lt;td&gt;ysoh&lt;\/td&gt;\r\n                    &lt;td&gt;\uc624\uc601\uc218&lt;\/td&gt;\r\n                    &lt;td&gt;ysoh&lt;\/td&gt;\r\n                    &lt;td&gt;ysoh@nomail.plz&lt;\/td&gt;\r\n                    &lt;td&gt;\r\n                        &lt;a href=\"examSQL-14.php\"&gt;\uc0ad\uc81c&lt;\/a&gt;\r\n                        &lt;a href=\"examSQL-15.php\"&gt;\uc218\uc815&lt;\/a&gt;\r\n                    &lt;\/td&gt;\r\n                &lt;\/tr&gt;\r\n            &lt;\/tbody&gt;\r\n        &lt;\/table&gt;\r\n    &lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<pre class=\"wrap:true lang:php decode:true\" title=\"examSQL-11.php\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n    &lt;head&gt;\r\n        &lt;meta charset=\"UTF-8\"&gt;\r\n        &lt;style&gt;\r\n            h1 {text-align: center;}\r\n            table {margin: 0 auto;}\r\n        &lt;\/style&gt;\r\n        &lt;title&gt;examSQL-11.php&lt;\/title&gt;\r\n    &lt;\/head&gt;\r\n    &lt;body&gt;\r\n        &lt;h1&gt;\ud68c\uc6d0\ubaa9\ub85d&lt;\/h1&gt;\r\n        &lt;table&gt;\r\n            &lt;thead&gt;\r\n                &lt;tr&gt;\r\n                    &lt;th&gt;\uc21c\ubc88&lt;\/th&gt;\r\n                    &lt;th&gt;\uc544\uc774\ub514&lt;\/th&gt;\r\n                    &lt;th&gt;\uc131\uba85&lt;\/th&gt;\r\n                    &lt;th&gt;\ube44\ubc00\ubc88\ud638&lt;\/th&gt;\r\n                    &lt;th&gt;\uc774\uba54\uc77c&lt;\/th&gt;\r\n                    &lt;th&gt;\ub3d9\uc791&lt;\/th&gt;\r\n                &lt;\/tr&gt;\r\n            &lt;\/thead&gt;\r\n            &lt;tbody&gt;\r\n                &lt;?php\r\n                require '.\/dbConn.php';\r\n\r\n                $link = mysqli_connect($dbHost, $dbUser, $dbPass); \/\/ MySQL \uc11c\ubc84 \uc5f0\uacb0\r\n                if (!$link) { \/\/ DB\uc5f0\uacb0\uc5d0 \uc2e4\ud328\ud55c \uacbd\uc6b0 ($!link, $link!=true, $link==false \ubaa8\ub450 \ub3d9\uc77c)\r\n                    echo \"DB \uc5f0\uacb0\uc5d0 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4.&lt;br\/&gt;\";\r\n                    exit();   \/\/ \ud504\ub85c\uadf8\ub7a8 \uc885\ub8cc\r\n                }\r\n\r\n                $db = mysqli_select_db($link, $dbName); \/\/ Database \uc120\ud0dd\r\n                if (!$db) {  \/\/ DB\uc120\ud0dd\uc5d0 \uc2e4\ud328\ud55c \uacbd\uc6b0 ($!$db, $db!=true, $db==false \ubaa8\ub450 \ub3d9\uc77c)\r\n                    echo \"{$dbName} \uc774\ub984\uc758 DB\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.&lt;br\/&gt;\";\r\n                    exit();  \/\/ \ud504\ub85c\uadf8\ub7a8 \uc885\ub8cc\r\n                }\r\n\r\n                $char = mysqli_set_charset($link, \"utf8\"); \/\/ DB \ubb38\uc790\uc14b \uc124\uc815\r\n                if (!$char) { \/\/ \ubb38\uc790\uc14b \uc124\uc815\uc5d0 \uc2e4\ud328\ud55c \uacbd\uc6b0 ($!$char, $char!=true, $char==false \ubaa8\ub450 \ub3d9\uc77c)\r\n                    echo \"UTF-8 \ubb38\uc790\uc14b\uc744 \uc124\uc815\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4.&lt;br\/&gt;\";\r\n                    exit();   \/\/ \ud504\ub85c\uadf8\ub7a8 \uc885\ub8cc\r\n                }\r\n\r\n                $sql = \"SELECT `userid`, `passwd`, `name`, `email` FROM `user`\";\r\n\r\n                $result = mysqli_query($link, $sql); \/\/ SQL \uc2e4\ud589\r\n                if (!$result) { \/\/ SQL\uc5d0 \uc624\ub958\uac00 \uc788\ub294 \uacbd\uc6b0\r\n                    echo \"SQL\uc5d0 \uc624\ub958\uac00 \uc788\uc2b5\ub2c8\ub2e4.&lt;br\/&gt;\";\r\n                    exit();     \/\/ \ud504\ub85c\uadf8\ub7a8 \uc885\ub8cc\r\n                }\r\n                \r\n                $no = 1;\r\n                while ($row = mysqli_fetch_array($result)) { \/\/ \ub8e8\ud504\ub97c \ub3cc\uba70 \uac80\uc0c9\ub41c \uacb0\uacfc\uc5d0\uc11c \ub9c8\uc9c0\ub9c9\uc774 \ub420 \ub54c\uae4c\uc9c0 \ub808\ucf54\ub4dc\ub97c \ud558\ub098\uc529 \uac00\uc838\uc634\r\n                    echo \"&lt;tr&gt;\";\r\n                    echo \"&lt;td&gt;$no&lt;\/td&gt;\";\r\n                    echo \"&lt;td&gt;{$row[\"userid\"]}&lt;\/td&gt;\"; \/\/ \ud544\ub4dc\uba85\uc744 \ud0a4\ub85c\ud558\uc5ec \uc6d0\ud558\ub294 \ub370\uc774\ud130\uc5d0 \uc811\uadfc\r\n                    echo \"&lt;td&gt;{$row[\"passwd\"]}&lt;\/td&gt;\";\r\n                    echo \"&lt;td&gt;{$row[\"name\"]}&lt;\/td&gt;\";\r\n                    echo \"&lt;td&gt;{$row[\"email\"]}&lt;\/td&gt;\";\r\n                    echo \"&lt;td&gt;&lt;a href='.\/examSQL-14.php'&gt;\uc0ad\uc81c&lt;\/a&gt;&lt;\/td&gt;\";\r\n                    echo \"&lt;td&gt;&lt;a href='.\/examSQL-15.php'&gt;\uc218\uc815&lt;\/a&gt;&lt;\/td&gt;\";\r\n                    echo \"&lt;\/tr&gt;\";\r\n                    $no ++;\r\n                }\r\n\r\n                mysqli_close($link); \/\/ MySQL \uc5f0\uacb0 \uc885\ub8cc\r\n                ?&gt;\r\n            &lt;\/tbody&gt;\r\n        &lt;\/table&gt;\r\n    &lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<div id=\"attachment_2324\" style=\"width: 502px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-11.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2324\" data-attachment-id=\"2324\" data-permalink=\"https:\/\/www.happyfam.or.kr\/ysoh\/webdbii-%ec%8b%a4%ec%8a%b5%ec%98%88%ec%a0%9c-%ec%86%8c%ec%8a%a4-4\/examsql-11\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-11.png?fit=492%2C323&amp;ssl=1\" data-orig-size=\"492,323\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"examSQL-11\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-11.png?fit=492%2C323&amp;ssl=1\" class=\"wp-image-2324 size-full\" src=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-11.png?resize=492%2C323\" alt=\"examSQL-11\" width=\"492\" height=\"323\" srcset=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-11.png?w=492&amp;ssl=1 492w, https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-11.png?resize=300%2C196&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-11.png?resize=120%2C80&amp;ssl=1 120w\" sizes=\"auto, (max-width: 492px) 100vw, 492px\" \/><\/a><p id=\"caption-attachment-2324\" class=\"wp-caption-text\">examSQL-11.php \uc2e4\ud589\uacb0\uacfc<\/p><\/div>\n<pre class=\"wrap:true lang:php decode:true\" title=\"examSQL-12.php\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n    &lt;head&gt;\r\n        &lt;meta charset=\"UTF-8\"&gt;\r\n        &lt;style&gt;\r\n            h1 {text-align: center;}\r\n            table {margin: 0 auto;}\r\n        &lt;\/style&gt;\r\n        &lt;title&gt;examSQL-12.php&lt;\/title&gt;\r\n    &lt;\/head&gt;\r\n    &lt;body&gt;\r\n        &lt;h1&gt;\ud68c\uc6d0\ubaa9\ub85d&lt;\/h1&gt;\r\n        &lt;table&gt;\r\n            &lt;thead&gt;\r\n                &lt;tr&gt;\r\n                    &lt;th&gt;\uc21c\ubc88&lt;\/th&gt;\r\n                    &lt;th&gt;\uc544\uc774\ub514&lt;\/th&gt;\r\n                    &lt;th&gt;\uc131\uba85&lt;\/th&gt;\r\n                    &lt;th&gt;\ube44\ubc00\ubc88\ud638&lt;\/th&gt;\r\n                    &lt;th&gt;\uc774\uba54\uc77c&lt;\/th&gt;\r\n                    &lt;th&gt;\ub3d9\uc791&lt;\/th&gt;\r\n                &lt;\/tr&gt;\r\n            &lt;\/thead&gt;\r\n            &lt;tbody&gt;\r\n                &lt;?php\r\n                require '.\/dbConn.php';\r\n\r\n                $link = mysqli_connect($dbHost, $dbUser, $dbPass); \/\/ MySQL \uc11c\ubc84 \uc5f0\uacb0\r\n                if (!$link) { \/\/ DB\uc5f0\uacb0\uc5d0 \uc2e4\ud328\ud55c \uacbd\uc6b0 ($!link, $link!=true, $link==false \ubaa8\ub450 \ub3d9\uc77c)\r\n                    echo \"DB \uc5f0\uacb0\uc5d0 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4.&lt;br\/&gt;\";\r\n                    exit();   \/\/ \ud504\ub85c\uadf8\ub7a8 \uc885\ub8cc\r\n                }\r\n\r\n                $db = mysqli_select_db($link, $dbName); \/\/ Database \uc120\ud0dd\r\n                if (!$db) {  \/\/ DB\uc120\ud0dd\uc5d0 \uc2e4\ud328\ud55c \uacbd\uc6b0 ($!$db, $db!=true, $db==false \ubaa8\ub450 \ub3d9\uc77c)\r\n                    echo \"{$dbName} \uc774\ub984\uc758 DB\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.&lt;br\/&gt;\";\r\n                    exit();  \/\/ \ud504\ub85c\uadf8\ub7a8 \uc885\ub8cc\r\n                }\r\n\r\n                $char = mysqli_set_charset($link, \"utf8\"); \/\/ DB \ubb38\uc790\uc14b \uc124\uc815\r\n                if (!$char) { \/\/ \ubb38\uc790\uc14b \uc124\uc815\uc5d0 \uc2e4\ud328\ud55c \uacbd\uc6b0 ($!$char, $char!=true, $char==false \ubaa8\ub450 \ub3d9\uc77c)\r\n                    echo \"UTF-8 \ubb38\uc790\uc14b\uc744 \uc124\uc815\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4.&lt;br\/&gt;\";\r\n                    exit();   \/\/ \ud504\ub85c\uadf8\ub7a8 \uc885\ub8cc\r\n                }\r\n\r\n                $sql = \"SELECT `userid`, `passwd`, `name`, `email` FROM `user`\";\r\n\r\n                $result = mysqli_query($link, $sql); \/\/ SQL \uc2e4\ud589\r\n                if (!$result) { \/\/ SQL\uc5d0 \uc624\ub958\uac00 \uc788\ub294 \uacbd\uc6b0\r\n                    echo \"SQL\uc5d0 \uc624\ub958\uac00 \uc788\uc2b5\ub2c8\ub2e4.&lt;br\/&gt;\";\r\n                    exit();     \/\/ \ud504\ub85c\uadf8\ub7a8 \uc885\ub8cc\r\n                }\r\n\r\n                $no = 1;\r\n                while ($row = mysqli_fetch_array($result)) { \/\/ \ub8e8\ud504\ub97c \ub3cc\uba70 \uac80\uc0c9\ub41c \uacb0\uacfc\uc5d0\uc11c \ub9c8\uc9c0\ub9c9\uc774 \ub420 \ub54c\uae4c\uc9c0 \ub808\ucf54\ub4dc\ub97c \ud558\ub098\uc529 \uac00\uc838\uc634\r\n                    ?&gt;\r\n\r\n                    &lt;tr&gt;\r\n                        &lt;td&gt;&lt;?= $no ?&gt;&lt;\/td&gt;\r\n                        &lt;td&gt;&lt;?= $row[\"userid\"] ?&gt;&lt;\/td&gt;\r\n                        &lt;td&gt;&lt;?= $row[\"passwd\"] ?&gt;&lt;\/td&gt;\r\n                        &lt;td&gt;&lt;?= $row[\"name\"] ?&gt;&lt;\/td&gt;\r\n                        &lt;td&gt;&lt;?= $row[\"email\"] ?&gt;&lt;\/td&gt;\r\n                        &lt;td&gt;&lt;a href='.\/examSQL-14.php'&gt;\uc0ad\uc81c&lt;\/a&gt;&lt;\/td&gt;\r\n                        &lt;td&gt;&lt;a href='.\/examSQL-15.php'&gt;\uc218\uc815&lt;\/a&gt;&lt;\/td&gt;\r\n                    &lt;\/tr&gt;\r\n                    &lt;?php\r\n                    $no ++;\r\n                }\r\n\r\n                mysqli_close($link); \/\/ MySQL \uc5f0\uacb0 \uc885\ub8cc\r\n                ?&gt;\r\n            &lt;\/tbody&gt;\r\n        &lt;\/table&gt;\r\n    &lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<div id=\"attachment_2325\" style=\"width: 502px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-12.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2325\" data-attachment-id=\"2325\" data-permalink=\"https:\/\/www.happyfam.or.kr\/ysoh\/webdbii-%ec%8b%a4%ec%8a%b5%ec%98%88%ec%a0%9c-%ec%86%8c%ec%8a%a4-4\/examsql-12\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-12.png?fit=492%2C323&amp;ssl=1\" data-orig-size=\"492,323\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"examSQL-12\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-12.png?fit=492%2C323&amp;ssl=1\" class=\"wp-image-2325 size-full\" src=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-12.png?resize=492%2C323\" alt=\"examSQL-12\" width=\"492\" height=\"323\" srcset=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-12.png?w=492&amp;ssl=1 492w, https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-12.png?resize=300%2C196&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-12.png?resize=120%2C80&amp;ssl=1 120w\" sizes=\"auto, (max-width: 492px) 100vw, 492px\" \/><\/a><p id=\"caption-attachment-2325\" class=\"wp-caption-text\">examSQL-12.php \uc2e4\ud589\uacb0\uacfc<\/p><\/div>\n<pre class=\"wrap:true lang:php decode:true\" title=\"examSQL-13.php\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n    &lt;head&gt;\r\n        &lt;meta charset=\"UTF-8\"&gt;\r\n        &lt;style&gt;\r\n            h1 {text-align: center;}\r\n            table {margin: 0 auto;}\r\n        &lt;\/style&gt;\r\n        &lt;title&gt;examSQL-13.php&lt;\/title&gt;\r\n    &lt;\/head&gt;\r\n    &lt;body&gt;\r\n        &lt;h1&gt;\ud68c\uc6d0\ubaa9\ub85d&lt;\/h1&gt;\r\n        &lt;table&gt;\r\n            &lt;thead&gt;\r\n                &lt;tr&gt;\r\n                    &lt;th&gt;\uc21c\ubc88&lt;\/th&gt;\r\n                    &lt;th&gt;\uc544\uc774\ub514&lt;\/th&gt;\r\n                    &lt;th&gt;\uc131\uba85&lt;\/th&gt;\r\n                    &lt;th&gt;\ube44\ubc00\ubc88\ud638&lt;\/th&gt;\r\n                    &lt;th&gt;\uc774\uba54\uc77c&lt;\/th&gt;\r\n                    &lt;th&gt;\ub3d9\uc791&lt;\/th&gt;\r\n                &lt;\/tr&gt;\r\n            &lt;\/thead&gt;\r\n            &lt;tbody&gt;\r\n                &lt;?php\r\n                require '.\/dbConn.php';\r\n\r\n                $link = mysqli_connect($dbHost, $dbUser, $dbPass); \/\/ MySQL \uc11c\ubc84 \uc5f0\uacb0\r\n                if (!$link) { \/\/ DB\uc5f0\uacb0\uc5d0 \uc2e4\ud328\ud55c \uacbd\uc6b0 ($!link, $link!=true, $link==false \ubaa8\ub450 \ub3d9\uc77c)\r\n                    echo \"DB \uc5f0\uacb0\uc5d0 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4.&lt;br\/&gt;\";\r\n                    exit();   \/\/ \ud504\ub85c\uadf8\ub7a8 \uc885\ub8cc\r\n                }\r\n\r\n                $db = mysqli_select_db($link, $dbName); \/\/ Database \uc120\ud0dd\r\n                if (!$db) {  \/\/ DB\uc120\ud0dd\uc5d0 \uc2e4\ud328\ud55c \uacbd\uc6b0 ($!$db, $db!=true, $db==false \ubaa8\ub450 \ub3d9\uc77c)\r\n                    echo \"{$dbName} \uc774\ub984\uc758 DB\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.&lt;br\/&gt;\";\r\n                    exit();  \/\/ \ud504\ub85c\uadf8\ub7a8 \uc885\ub8cc\r\n                }\r\n\r\n                $char = mysqli_set_charset($link, \"utf8\"); \/\/ DB \ubb38\uc790\uc14b \uc124\uc815\r\n                if (!$char) { \/\/ \ubb38\uc790\uc14b \uc124\uc815\uc5d0 \uc2e4\ud328\ud55c \uacbd\uc6b0 ($!$char, $char!=true, $char==false \ubaa8\ub450 \ub3d9\uc77c)\r\n                    echo \"UTF-8 \ubb38\uc790\uc14b\uc744 \uc124\uc815\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4.&lt;br\/&gt;\";\r\n                    exit();   \/\/ \ud504\ub85c\uadf8\ub7a8 \uc885\ub8cc\r\n                }\r\n\r\n                $sql = \"SELECT `userid`, `passwd`, `name`, `email` FROM `user`\";\r\n\r\n                $result = mysqli_query($link, $sql); \/\/ SQL \uc2e4\ud589\r\n                if (!$result) { \/\/ SQL\uc5d0 \uc624\ub958\uac00 \uc788\ub294 \uacbd\uc6b0\r\n                    echo \"SQL\uc5d0 \uc624\ub958\uac00 \uc788\uc2b5\ub2c8\ub2e4.&lt;br\/&gt;\";\r\n                    exit();     \/\/ \ud504\ub85c\uadf8\ub7a8 \uc885\ub8cc\r\n                }\r\n\r\n                $no = 1;\r\n                while ($row = mysqli_fetch_array($result)) { \/\/ \ub8e8\ud504\ub97c \ub3cc\uba70 \uac80\uc0c9\ub41c \uacb0\uacfc\uc5d0\uc11c \ub9c8\uc9c0\ub9c9\uc774 \ub420 \ub54c\uae4c\uc9c0 \ub808\ucf54\ub4dc\ub97c \ud558\ub098\uc529 \uac00\uc838\uc634\r\n                    ?&gt;\r\n                    &lt;tr&gt;\r\n                        &lt;td&gt;&lt;?= $no ?&gt;&lt;\/td&gt;\r\n                        &lt;td&gt;&lt;?= $row[\"userid\"] ?&gt;&lt;\/td&gt;\r\n                        &lt;td&gt;&lt;?= $row[\"passwd\"] ?&gt;&lt;\/td&gt;\r\n                        &lt;td&gt;&lt;?= $row[\"name\"] ?&gt;&lt;\/td&gt;\r\n                        &lt;td&gt;&lt;?= $row[\"email\"] ?&gt;&lt;\/td&gt;\r\n                        &lt;td&gt;&lt;a href='.\/examSQL-14.php?userid=&lt;?= $row[\"userid\"] ?&gt;'&gt;\uc0ad\uc81c&lt;\/a&gt;&lt;\/td&gt;\r\n                        &lt;td&gt;&lt;a href='.\/examSQL-15.php?userid=&lt;?= $row[\"userid\"] ?&gt;'&gt;\uc218\uc815&lt;\/a&gt;&lt;\/td&gt;\r\n                    &lt;\/tr&gt;\r\n                    &lt;?php\r\n                    $no ++;\r\n                }\r\n\r\n                mysqli_close($link); \/\/ MySQL \uc5f0\uacb0 \uc885\ub8cc\r\n                ?&gt;\r\n            &lt;\/tbody&gt;\r\n        &lt;\/table&gt;\r\n    &lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<div id=\"attachment_2326\" style=\"width: 502px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-13.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2326\" data-attachment-id=\"2326\" data-permalink=\"https:\/\/www.happyfam.or.kr\/ysoh\/webdbii-%ec%8b%a4%ec%8a%b5%ec%98%88%ec%a0%9c-%ec%86%8c%ec%8a%a4-4\/examsql-13\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-13.png?fit=492%2C323&amp;ssl=1\" data-orig-size=\"492,323\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"examSQL-13\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-13.png?fit=492%2C323&amp;ssl=1\" class=\"wp-image-2326 size-full\" src=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-13.png?resize=492%2C323\" alt=\"examSQL-13\" width=\"492\" height=\"323\" srcset=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-13.png?w=492&amp;ssl=1 492w, https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-13.png?resize=300%2C196&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-13.png?resize=120%2C80&amp;ssl=1 120w\" sizes=\"auto, (max-width: 492px) 100vw, 492px\" \/><\/a><p id=\"caption-attachment-2326\" class=\"wp-caption-text\">examSQL-13.php \uc2e4\ud589\uacb0\uacfc<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset=&#8221;UTF-8&#8243;&gt; &lt;style&gt; h1 {text-align: center;} table {margin: 0 auto;} &lt;\/style&gt; &lt;title&gt;examSQL-10.php&lt;\/title&gt; &lt;\/head&gt; &lt;body&gt; &lt;h1&gt;\ud68c\uc6d0\ubaa9\ub85d&lt;\/h1&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;\uc21c\ubc88&lt;\/th&gt; &lt;th&gt;\uc544\uc774\ub514&lt;\/th&gt; &lt;th&gt;\uc131\uba85&lt;\/th&gt; &lt;th&gt;\ube44\ubc00\ubc88\ud638&lt;\/th&gt; &lt;th&gt;\uc774\uba54\uc77c&lt;\/th&gt; &lt;th&gt;\ub3d9\uc791&lt;\/th&gt; &lt;\/tr&gt; &lt;\/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;1&lt;\/td&gt; &lt;td&gt;hong&lt;\/td&gt; &lt;td&gt;\ud64d\uae38\ub3d9&lt;\/td&gt; &lt;td&gt;hong&lt;\/td&gt; &lt;td&gt;hong@nomail.plz&lt;\/td&gt; &lt;td&gt; &lt;a href=&#8221;.\/examSQL-14.php&#8221;&gt;\uc0ad\uc81c&lt;\/a&gt; &lt;a href=&#8221;.\/examSQL-15.php&#8221;&gt;\uc218\uc815&lt;\/a&gt; &lt;\/td&gt; &lt;\/tr&gt; &lt;tr&gt; &lt;td&gt;2&lt;\/td&gt; &lt;td&gt;yskim&lt;\/td&gt; &lt;td&gt;\uae40\uc601\uc0bc&lt;\/td&gt; &lt;td&gt;yskim&lt;\/td&gt; &lt;td&gt;yskim@nomail.plz&lt;\/td&gt; &lt;td&gt; &lt;a href=&#8221;examSQL-14.php&#8221;&gt;\uc0ad\uc81c&lt;\/a&gt; &lt;a href=&#8221;examSQL-15.php&#8221;&gt;\uc218\uc815&lt;\/a&gt;\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.happyfam.or.kr\/ysoh\/webdbii-%ec%8b%a4%ec%8a%b5%ec%98%88%ec%a0%9c-%ec%86%8c%ec%8a%a4-4\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":3,"featured_media":2323,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[134,2],"tags":[233,21,34,40,53],"class_list":["post-2303","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-webdbii","category-2","tag-database","tag-html","tag-mysql","tag-php","tag-webdb"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/2014\/09\/examSQL-10.png?fit=492%2C323&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p776QY-B9","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/posts\/2303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/comments?post=2303"}],"version-history":[{"count":0,"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/posts\/2303\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/media\/2323"}],"wp:attachment":[{"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/media?parent=2303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/categories?post=2303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/tags?post=2303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}