{"id":29207,"date":"2016-08-07T21:14:52","date_gmt":"2016-08-07T15:14:52","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=29207"},"modified":"2016-08-07T21:23:29","modified_gmt":"2016-08-07T15:23:29","slug":"%d0%bf%d1%80%d0%be%d1%81%d1%82%d0%b0%d1%8f-%d1%81%d1%82%d0%b0%d1%82%d0%b8%d1%81%d1%82%d0%b8%d0%ba%d0%b0-%d0%ba%d0%be%d0%bb-%d0%b2%d0%b0-%d0%bf%d0%be%d1%81%d0%b5%d1%89%d0%b5%d0%bd%d0%b8%d0%b9-%d1%81","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=29207","title":{"rendered":"\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043a\u043e\u043b-\u0432\u0430 \u043f\u043e\u0441\u0435\u0449\u0435\u043d\u0438\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b"},"content":{"rendered":"<p>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u0441\u0432\u044f\u0437\u043a\u0435 MySQL + PHP. \u0422\u0430\u043a \u043a\u0430\u043a \u0441\u043a\u0440\u0438\u043f\u0442 php \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0442\u043e \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u0441\u0435\u0449\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<\/p>\n<p>\u0412 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 <strong>stat<\/strong> INT(10).<\/p>\n<pre><span style=\"color: #000000;\"><span style=\"color: #b1b100;\">require<\/span><\/span><span style=\"color: #000000;\">\u00a0<span style=\"color: #0000ff;\">\"connect.php\"<\/span><span style=\"color: #339933;\">;<\/span><\/span>\r\n<span style=\"color: #000000;\"><span style=\"color: #000088;\">$result<\/span>\u00a0<span style=\"color: #339933;\">=<\/span>\u00a0<span style=\"color: #990000;\">mysql_query<\/span>\u00a0<span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"SELECT\u00a0*\u00a0FROM\u00a0blog\u00a0WHERE\u00a0id=\"<\/span><span style=\"color: #339933;\">.<\/span><span style=\"color: #000088;\">$_GET<\/span><span style=\"color: #009900;\">[<\/span><span style=\"color: #0000ff;\">\"id\"<\/span><span style=\"color: #009900;\">]<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/span>\r\n<span style=\"color: #000000;\"><span style=\"color: #b1b100;\">while<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$r<\/span>\u00a0<span style=\"color: #339933;\">=<\/span>\u00a0<span style=\"color: #990000;\">mysql_fetch_array<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$result<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">{<\/span><\/span>\r\n<span style=\"color: #000000;\"><span style=\"color: #000088;\">$stat <\/span><span style=\"color: #339933;\">= <\/span><span style=\"color: #000088;\">$r<\/span><span style=\"color: #009900;\">[<\/span><span style=\"color: #0000ff;\">\"stat\"<\/span><span style=\"color: #009900;\">]<\/span><span style=\"color: #339933;\">+<\/span><span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #339933;\">;<\/span><\/span>\r\n<span style=\"color: #000000;\"><span style=\"color: #000088;\">$result<\/span>\u00a0<span style=\"color: #339933;\">=<\/span>\u00a0<span style=\"color: #990000;\">mysql_query<\/span>\u00a0<span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"UPDATE\u00a0blog\u00a0SET\u00a0stat='<span style=\"color: #006699;\">$stat<\/span>'\u00a0WHERE\u00a0id='<span style=\"color: #006699;\">$_GET[id]<\/span>'\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/span>\r\n<span style=\"color: #000000;\"><span style=\"color: #b1b100;\">echo<\/span>\u00a0<span style=\"color: #0000ff;\">\"\u041a\u043e\u043b-\u0432\u043e\u00a0\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u0432:\u00a0\"<\/span><span style=\"color: #339933;\">.<\/span><span style=\"color: #000088;\">$r<span style=\"color: #009900;\">[<\/span><span style=\"color: #0000ff;\">\"stat\"<\/span><span style=\"color: #009900;\">]<\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"color: #339933;\">;<\/span><\/span>\r\n<span style=\"color: #000000;\"><span style=\"color: #339933;\">}<\/span><\/span><\/pre>\n<p><span style=\"color: #000000; font-weight: bold;\">\u0424\u0430\u0439\u043b <strong>connect.php<\/strong> &#8212; \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/span><br \/>\n<strong>blog<\/strong> &#8212; \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<br \/>\n<strong>stat<\/strong> &#8212; \u043f\u043e\u043b\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 <strong>blog<\/strong><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f <strong>stat<\/strong> \u0442\u0430\u0431\u043b\u0438\u0446\u044b <strong>blog<\/strong> \u0431\u0443\u0434\u0435\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u0441\u0432\u044f\u0437\u043a\u0435 MySQL + PHP. \u0422\u0430\u043a \u043a\u0430\u043a \u0441\u043a\u0440\u0438\u043f\u0442 php \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0442\u043e \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u0441\u0435\u0449\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u0412 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 stat INT(10). require\u00a0&#171;connect.php&#187;; $result\u00a0=\u00a0mysql_query\u00a0(&#171;SELECT\u00a0*\u00a0FROM\u00a0blog\u00a0WHERE\u00a0id=&#187;.$_GET[&#171;id&#187;]); while($r\u00a0=\u00a0mysql_fetch_array($result)){ $stat = $r[&#171;stat&#187;]+1; $result\u00a0=\u00a0mysql_query\u00a0(&#171;UPDATE\u00a0blog\u00a0SET\u00a0stat=&#8217;$stat&#8217;\u00a0WHERE\u00a0id=&#8217;$_GET[id]'&#187;); echo\u00a0&#171;\u041a\u043e\u043b-\u0432\u043e\u00a0\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u0432:\u00a0&#171;.$r[&#171;stat&#187;]; } \u0424\u0430\u0439\u043b connect.php &#8212; \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 blog &#8212; \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 stat [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":29209,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[183],"tags":[],"class_list":["post-29207","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php"],"views":2414,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/29207","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=29207"}],"version-history":[{"count":0,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/29207\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/29209"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=29207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=29207"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=29207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}