{"id":128749,"date":"2022-07-03T20:17:04","date_gmt":"2022-07-03T14:17:04","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=128749"},"modified":"2022-07-04T15:22:09","modified_gmt":"2022-07-04T09:22:09","slug":"%d0%bf%d0%be%d0%b4%d0%ba%d0%bb%d1%8e%d1%87%d0%b5%d0%bd%d0%b8%d0%b5-%d0%ba-%d0%b1%d0%b0%d0%b7%d0%b5-%d0%b4%d0%b0%d0%bd%d0%bd%d1%8b%d1%85-mysql-%d0%b2-php7","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=128749","title":{"rendered":"\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 mysql \u0432 php7"},"content":{"rendered":"<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f mysqli_connect \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u0440\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430: \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u0445\u043e\u0441\u0442), \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<pre class=\"php\" style=\"font-family: monospace; font-size: 12px;\"><span style=\"color: #000088;\">$connect<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #990000;\">mysqli_connect<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"localhost\"<\/span><span style=\"color: #339933;\">,<\/span> <span style=\"color: #0000ff;\">\"user\"<\/span><span style=\"color: #339933;\">,<\/span> <span style=\"color: #0000ff;\">\"pass\"<\/span><span style=\"color: #339933;\">,<\/span> <span style=\"color: #0000ff;\">\"database\"<\/span><span style=\"color: #009900;\">)<\/span>or <span style=\"color: #990000;\">die<\/span> <span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">'\u041d\u0435\u0442 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0411\u0430\u0437\u043e\u0439 \u0414\u0430\u043d\u043d\u044b\u0445'<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #990000;\">mysqli_query<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$connect<\/span><span style=\"color: #339933;\">,<\/span> <span style=\"color: #0000ff;\">\"SET NAMES utf8\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/pre>\n<ul>\n<li><b>mysqli_connect<\/b> &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n<pre class=\"php\" style=\"font-family: monospace; font-size: 12px;\"><span style=\"color: #000088;\">$query<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #0000ff;\">\"SELECT * FROM tab\"<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #000088;\">$result<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #990000;\">mysqli_query<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$connect<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #000088;\">$query<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f mysqli_connect \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u0440\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430: \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u0445\u043e\u0441\u0442), \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. $connect = mysqli_connect(&#171;localhost&#187;, &#171;user&#187;, &#171;pass&#187;, &#171;database&#187;)or die (&#8216;\u041d\u0435\u0442 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0411\u0430\u0437\u043e\u0439 \u0414\u0430\u043d\u043d\u044b\u0445&#8217;); mysqli_query($connect, &#171;SET NAMES utf8&#187;); mysqli_connect &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430: $query = &#171;SELECT * FROM tab&#187;; $result = mysqli_query($connect,$query);<\/p>\n","protected":false},"author":1,"featured_media":128750,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[183],"tags":[],"class_list":["post-128749","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php"],"views":1540,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/128749","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=128749"}],"version-history":[{"count":5,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/128749\/revisions"}],"predecessor-version":[{"id":128756,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/128749\/revisions\/128756"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/128750"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=128749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=128749"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=128749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}