{"id":135310,"date":"2026-07-21T08:46:33","date_gmt":"2026-07-21T02:46:33","guid":{"rendered":"https:\/\/rcl-radio.ru\/?p=135310"},"modified":"2026-07-21T08:46:33","modified_gmt":"2026-07-21T02:46:33","slug":"%d1%87%d0%b8%d1%82%d0%b0%d0%b5%d0%bc-%d1%81%d0%bf%d0%b8%d1%81%d0%be%d0%ba-%d1%81%d1%82%d1%80%d0%be%d0%ba-%d0%b8%d0%b7-mysql-%d0%b2-php-%d1%86%d0%b8%d0%ba%d0%bb-%d0%b8-%d0%b2%d1%8b%d0%b2%d0%be%d0%b4","status":"publish","type":"post","link":"https:\/\/rcl-radio.ru\/?p=135310","title":{"rendered":"\u0427\u0438\u0442\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0440\u043e\u043a \u0438\u0437 MySQL \u0432 PHP: \u0446\u0438\u043a\u043b \u0438 \u0432\u044b\u0432\u043e\u0434"},"content":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u0447\u0430\u0441\u0442\u0430\u044f: \u0435\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0430, \u043d\u0430\u0434\u043e \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0440\u043e\u043a \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439: ID \u0438 \u0438\u043c\u044f. \u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043f\u043e \u0448\u0430\u0433\u0430\u043c, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0437\u0430 \u0447\u0435\u043c \u0438\u0434\u0451\u0442 \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a.<\/p>\n<h3>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u0435 \u0447\u0435\u0440\u0435\u0437 PDO<\/h3>\n<div class=\"CodeBlock CodeBlock_overflow_visible CodeBlock_highlight\">\n<div class=\"CodeBlock-StickyWrapper\">\n<div class=\"CodeBlock-Header\">\n<div class=\"CodeBlock-HeaderTitle\">php<\/div>\n<pre class=\"php\" style=\"font-family: monospace; font-size: 14px;\"><span style=\"color: #000088;\">$dsn<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #0000ff;\">'mysql:host=localhost;dbname=testdb;charset=utf8mb4'<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #000088;\">$user<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #0000ff;\">'db_user'<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #000088;\">$pass<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #0000ff;\">'db_pass'<\/span><span style=\"color: #339933;\">;<\/span>\r\n\u00a0\r\n<span style=\"color: #000088;\">$pdo<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #000000; font-weight: bold;\">new<\/span> PDO<span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$dsn<\/span><span style=\"color: #339933;\">,<\/span> <span style=\"color: #000088;\">$user<\/span><span style=\"color: #339933;\">,<\/span> <span style=\"color: #000088;\">$pass<\/span><span style=\"color: #339933;\">,<\/span> <span style=\"color: #009900;\">[<\/span>\r\n    PDO<span style=\"color: #339933;\">::<\/span><span style=\"color: #004000;\">ATTR_ERRMODE<\/span> <span style=\"color: #339933;\">=&gt;<\/span> PDO<span style=\"color: #339933;\">::<\/span><span style=\"color: #004000;\">ERRMODE_EXCEPTION<\/span>\r\n<span style=\"color: #009900;\">]<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442:<\/p>\n<ul>\n<li data-value=\"\" data-shift=\"0\"><code class=\"CodeInlined\">$dsn<\/code> \u2014 \u044d\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. \u0412 \u043d\u0435\u0439 \u0443\u043a\u0430\u0437\u0430\u043d\u043e: \u0434\u0440\u0430\u0439\u0432\u0435\u0440 <code class=\"CodeInlined\">mysql<\/code>, \u0445\u043e\u0441\u0442 (<code class=\"CodeInlined\">host=localhost<\/code>), \u0438\u043c\u044f \u0431\u0430\u0437\u044b (<code class=\"CodeInlined\">dbname=testdb<\/code>) \u0438 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 (<code class=\"CodeInlined\">charset=utf8mb4<\/code>).<br \/>\n\u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 <code class=\"CodeInlined\">utf8mb4<\/code> \u2014 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442: \u043e\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 Unicode, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u044d\u043c\u043e\u0434\u0437\u0438 \u0438 \u0440\u0435\u0434\u043a\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b. \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e <code class=\"CodeInlined\">utf8<\/code>, \u0447\u0430\u0441\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.<\/li>\n<li data-value=\"\" data-shift=\"0\"><code class=\"CodeInlined\">$user<\/code> \u0438 <code class=\"CodeInlined\">$pass<\/code> \u2014 \u0443\u0447\u0451\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0431\u0430\u0437\u0435. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u044d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u0445\u0440\u0430\u043d\u044f\u0442 \u043f\u0440\u044f\u043c\u043e \u0432 \u043a\u043e\u0434\u0435, \u0430 \u0432\u044b\u043d\u043e\u0441\u044f\u0442 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.<\/li>\n<li data-value=\"\" data-shift=\"0\"><code class=\"CodeInlined\">new PDO(...)<\/code> \u2014 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445.<\/li>\n<li data-value=\"\" data-shift=\"0\">\u041e\u043f\u0446\u0438\u044f <code class=\"CodeInlined\">PDO::ATTR_ERRMODE =&gt; PDO::ERRMODE_EXCEPTION<\/code> \u0437\u0430\u0434\u0430\u0451\u0442 \u0440\u0435\u0436\u0438\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043e\u043a: \u043f\u0440\u0438 \u043b\u044e\u0431\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0435 (\u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c, \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430\u044f \u0431\u0430\u0437\u0430, \u043e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430) \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0440\u043e\u0448\u0435\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438: \u043e\u0448\u0438\u0431\u043a\u0430 \u043d\u0435 \u00ab\u043f\u0440\u043e\u0433\u043b\u043e\u0442\u0438\u0442\u0441\u044f\u00bb, \u0430 \u0441\u0440\u0430\u0437\u0443 \u0441\u0442\u0430\u043d\u0435\u0442 \u0437\u0430\u043c\u0435\u0442\u043d\u043e\u0439.<\/li>\n<\/ul>\n<hr \/>\n<h3>\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/h3>\n<div class=\"CodeBlock CodeBlock_overflow_visible CodeBlock_highlight\">\n<div class=\"CodeBlock-StickyWrapper\">\n<div class=\"CodeBlock-Header\">\n<div class=\"CodeBlock-HeaderTitle\">php<\/div>\n<pre class=\"php\" style=\"font-family: monospace; font-size: 14px;\"><span style=\"color: #000088;\">$stmt<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #000088;\">$pdo<\/span><span style=\"color: #339933;\">-&gt;<\/span><span style=\"color: #004000;\">query<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">'SELECT id, name FROM users LIMIT 10'<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0420\u0430\u0437\u0431\u043e\u0440:<\/p>\n<ul>\n<li data-value=\"\" data-shift=\"0\"><code class=\"CodeInlined\">query()<\/code> \u2014 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f SQL\u2011\u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0415\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442, \u043a\u043e\u0433\u0434\u0430 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043d\u0435\u0442 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/li>\n<li data-value=\"\" data-shift=\"0\"><code class=\"CodeInlined\">SELECT id, name<\/code> \u2014 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0443\u0436\u043d\u044b\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438. \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430: \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code class=\"CodeInlined\">SELECT *<\/code>, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u044b \u043b\u0438\u0448\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f. \u0422\u0430\u043a \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0451\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u043d\u0438\u0436\u0430\u0435\u0442\u0441\u044f \u0440\u0438\u0441\u043a \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/li>\n<li data-value=\"\" data-shift=\"0\"><code class=\"CodeInlined\">FROM users<\/code> \u2014 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c, \u0438\u0437 \u043a\u0430\u043a\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0431\u0435\u0440\u0451\u043c \u0434\u0430\u043d\u043d\u044b\u0435.<\/li>\n<li data-value=\"\" data-shift=\"0\"><code class=\"CodeInlined\">LIMIT 10<\/code> \u2014 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0441\u0442\u0440\u043e\u043a. \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u0435\u0441\u043b\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0431\u043e\u043b\u044c\u0448\u0430\u044f: \u0442\u0430\u043a \u043c\u044b \u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043b\u0438\u0448\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043b\u0438\u0448\u043d\u044e\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443.<\/li>\n<\/ul>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f <code class=\"CodeInlined\">query()<\/code> \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code class=\"CodeInlined\">$stmt<\/code>. \u042d\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e \u043e\u0434\u043d\u043e\u0439.<\/p>\n<hr \/>\n<h3>\u041f\u0435\u0440\u0435\u0431\u043e\u0440 \u0441\u0442\u0440\u043e\u043a \u0432 \u0446\u0438\u043a\u043b\u0435 \u0438 \u0432\u044b\u0432\u043e\u0434 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d<\/h3>\n<div class=\"CodeBlock CodeBlock_overflow_visible CodeBlock_highlight\">\n<div class=\"CodeBlock-StickyWrapper\">\n<div class=\"CodeBlock-Header\">\n<div class=\"CodeBlock-HeaderTitle\">php<\/div>\n<\/div>\n<pre class=\"php\" style=\"font-family: monospace; font-size: 14px;\"><span style=\"color: #b1b100;\">while<\/span> <span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$row<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #000088;\">$stmt<\/span><span style=\"color: #339933;\">-&gt;<\/span><span style=\"color: #004000;\">fetch<\/span><span style=\"color: #009900;\">(<\/span>PDO<span style=\"color: #339933;\">::<\/span><span style=\"color: #004000;\">FETCH_ASSOC<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #009900;\">{<\/span>\r\n    <span style=\"color: #b1b100;\">echo<\/span> <span style=\"color: #0000ff;\">'ID: '<\/span> <span style=\"color: #339933;\">.<\/span> <a href=\"http:\/\/www.php.net\/htmlspecialchars\"><span style=\"color: #990000;\">htmlspecialchars<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$row<\/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 style=\"color: #0000ff;\">', \u0418\u043c\u044f: '<\/span> <span style=\"color: #339933;\">.<\/span> <a href=\"http:\/\/www.php.net\/htmlspecialchars\"><span style=\"color: #990000;\">htmlspecialchars<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$row<\/span><span style=\"color: #009900;\">[<\/span><span style=\"color: #0000ff;\">'name'<\/span><span style=\"color: #009900;\">]<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #339933;\">.<\/span> <span style=\"color: #0000ff;\">'&lt;br&gt;'<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #009900;\">}<\/span><\/pre>\n<\/div>\n<\/div>\n<p>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n<ul>\n<li data-value=\"\" data-shift=\"0\"><code class=\"CodeInlined\">fetch(PDO::FETCH_ASSOC)<\/code> \u2014 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432 \u0432\u0438\u0434\u0435 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0433\u0434\u0435 \u043a\u043b\u044e\u0447\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0438\u043c\u0435\u043d\u0430\u043c \u043a\u043e\u043b\u043e\u043d\u043e\u043a (<code class=\"CodeInlined\">$row['id']<\/code>, <code class=\"CodeInlined\">$row['name']<\/code>).<\/li>\n<li data-value=\"\" data-shift=\"0\">\u0426\u0438\u043a\u043b <code class=\"CodeInlined\">while<\/code> \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f, \u043f\u043e\u043a\u0430 <code class=\"CodeInlined\">fetch()<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a\u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f, <code class=\"CodeInlined\">fetch()<\/code> \u0432\u0435\u0440\u043d\u0451\u0442 <code class=\"CodeInlined\">false<\/code>, \u0438 \u0446\u0438\u043a\u043b \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f.<\/li>\n<li data-value=\"\" data-shift=\"0\"><code class=\"CodeInlined\">htmlspecialchars()<\/code> \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0432 \u0432\u044b\u0432\u043e\u0434\u0435. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438: \u0435\u0441\u043b\u0438 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0435\u0441\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0432\u0440\u043e\u0434\u0435 <code class=\"CodeInlined\">&lt;<\/code>, <code class=\"CodeInlined\">&gt;<\/code>, <code class=\"CodeInlined\">&amp;<\/code>, \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u044b \u0432 HTML\u2011\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0438 \u043d\u0435 \u0441\u043b\u043e\u043c\u0430\u044e\u0442 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<\/li>\n<li data-value=\"\" data-shift=\"0\"><code class=\"CodeInlined\">&lt;br&gt;<\/code> \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0441\u0442\u0440\u043e\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u043b\u0430\u0441\u044c \u043d\u0430 \u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435.<\/li>\n<\/ul>\n<hr \/>\n<h2>\u0412\u0430\u0436\u043d\u043e\u0435 \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/h2>\n<p>\u041c\u0435\u0442\u043e\u0434 <code class=\"CodeInlined\">query()<\/code> \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0431\u0435\u0437 \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e ID \u0438\u043b\u0438 \u0433\u043e\u0440\u043e\u0434\u0443), \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c:<\/p>\n<div class=\"CodeBlock CodeBlock_overflow_visible CodeBlock_highlight\">\n<div class=\"CodeBlock-StickyWrapper\">\n<div class=\"CodeBlock-Header\">\n<div class=\"CodeBlock-HeaderTitle\">php<\/div>\n<pre class=\"php\" style=\"font-family: monospace; font-size: 14px;\"><span style=\"color: #000088;\">$id<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #cc66cc;\">5<\/span><span style=\"color: #339933;\">;<\/span> <span style=\"color: #666666; font-style: italic;\">\/\/ \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c (int)$_GET['id']<\/span>\r\n\u00a0\r\n<span style=\"color: #000088;\">$stmt<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #000088;\">$pdo<\/span><span style=\"color: #339933;\">-&gt;<\/span><span style=\"color: #004000;\">prepare<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">'SELECT id, name FROM users WHERE id = ? LIMIT 1'<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #000088;\">$stmt<\/span><span style=\"color: #339933;\">-&gt;<\/span><span style=\"color: #004000;\">execute<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">[<\/span><span style=\"color: #000088;\">$id<\/span><span style=\"color: #009900;\">]<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\r\n\u00a0\r\n<span style=\"color: #b1b100;\">while<\/span> <span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$row<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #000088;\">$stmt<\/span><span style=\"color: #339933;\">-&gt;<\/span><span style=\"color: #004000;\">fetch<\/span><span style=\"color: #009900;\">(<\/span>PDO<span style=\"color: #339933;\">::<\/span><span style=\"color: #004000;\">FETCH_ASSOC<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #009900;\">{<\/span>\r\n    <span style=\"color: #b1b100;\">echo<\/span> <span style=\"color: #0000ff;\">'ID: '<\/span> <span style=\"color: #339933;\">.<\/span> <a href=\"http:\/\/www.php.net\/htmlspecialchars\"><span style=\"color: #990000;\">htmlspecialchars<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$row<\/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 style=\"color: #0000ff;\">', \u0418\u043c\u044f: '<\/span> <span style=\"color: #339933;\">.<\/span> <a href=\"http:\/\/www.php.net\/htmlspecialchars\"><span style=\"color: #990000;\">htmlspecialchars<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$row<\/span><span style=\"color: #009900;\">[<\/span><span style=\"color: #0000ff;\">'name'<\/span><span style=\"color: #009900;\">]<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #339933;\">.<\/span> <span style=\"color: #0000ff;\">'&lt;br&gt;'<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #009900;\">}<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0417\u0434\u0435\u0441\u044c:<\/p>\n<ul>\n<li data-value=\"\" data-shift=\"0\"><code class=\"CodeInlined\">prepare()<\/code> \u2014 \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u043f\u043b\u0435\u0439\u0441\u0445\u043e\u043b\u0434\u0435\u0440\u043e\u043c <code class=\"CodeInlined\">?<\/code>.<\/li>\n<li data-value=\"\" data-shift=\"0\"><code class=\"CodeInlined\">execute([$id])<\/code> \u2014 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430. \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 \u043e\u0442 SQL\u2011\u0438\u043d\u044a\u0435\u043a\u0446\u0438\u0439: \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 \u0442\u0435\u043a\u0441\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e.<\/li>\n<\/ul>\n<hr \/>\n<h2>\u0427\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u0434 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b<\/h2>\n<ol>\n<li data-value=\"1.\" data-shift=\"1\"><strong>\u0421\u0435\u0440\u0432\u0435\u0440 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0443\u0449\u0435\u043d.<\/strong> \u0415\u0441\u043b\u0438 MySQL \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f.<\/li>\n<li data-value=\"2.\" data-shift=\"1\"><strong>\u0423\u0447\u0451\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u043d\u044b.<\/strong> \u041b\u043e\u0433\u0438\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0431\u0430\u0437\u044b \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043f\u0440\u0430\u0432\u0430\u043c\u0438.<\/li>\n<li data-value=\"3.\" data-shift=\"1\"><strong>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0438 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442.<\/strong> \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0430 <code class=\"CodeInlined\">users<\/code> \u0438 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 <code class=\"CodeInlined\">id<\/code>, <code class=\"CodeInlined\">name<\/code> \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0435\u0441\u0442\u044c \u0432 \u0431\u0430\u0437\u0435.<\/li>\n<li data-value=\"4.\" data-shift=\"1\"><strong>\u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 \u0432 DSN \u0443\u043a\u0430\u0437\u0430\u043d\u0430.<\/strong> <code class=\"CodeInlined\">charset=utf8mb4<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<\/li>\n<li data-value=\"5.\" data-shift=\"1\"><strong>\u041e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435 \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.<\/strong> \u0412 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u2011\u0441\u0440\u0435\u0434\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043b\u0443\u0447\u0448\u0435 \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435, \u0430 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432 \u043b\u043e\u0433. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e <code class=\"CodeInlined\">try\/catch<\/code>.<\/li>\n<\/ol>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043e\u043a:<\/p>\n<div class=\"CodeBlock CodeBlock_overflow_visible CodeBlock_highlight\">\n<div class=\"CodeBlock-StickyWrapper\">\n<div class=\"CodeBlock-Header\">\n<div class=\"CodeBlock-HeaderTitle\">php<\/div>\n<pre class=\"php\" style=\"font-family: monospace; font-size: 14px;\">try <span style=\"color: #009900;\">{<\/span>\r\n    <span style=\"color: #000088;\">$pdo<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #000000; font-weight: bold;\">new<\/span> PDO<span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$dsn<\/span><span style=\"color: #339933;\">,<\/span> <span style=\"color: #000088;\">$user<\/span><span style=\"color: #339933;\">,<\/span> <span style=\"color: #000088;\">$pass<\/span><span style=\"color: #339933;\">,<\/span> <span style=\"color: #009900;\">[<\/span>\r\n        PDO<span style=\"color: #339933;\">::<\/span><span style=\"color: #004000;\">ATTR_ERRMODE<\/span> <span style=\"color: #339933;\">=&gt;<\/span> PDO<span style=\"color: #339933;\">::<\/span><span style=\"color: #004000;\">ERRMODE_EXCEPTION<\/span>\r\n    <span style=\"color: #009900;\">]<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\r\n\u00a0\r\n    <span style=\"color: #000088;\">$stmt<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #000088;\">$pdo<\/span><span style=\"color: #339933;\">-&gt;<\/span><span style=\"color: #004000;\">query<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">'SELECT id, name FROM users LIMIT 10'<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\r\n\u00a0\r\n    <span style=\"color: #b1b100;\">while<\/span> <span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$row<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #000088;\">$stmt<\/span><span style=\"color: #339933;\">-&gt;<\/span><span style=\"color: #004000;\">fetch<\/span><span style=\"color: #009900;\">(<\/span>PDO<span style=\"color: #339933;\">::<\/span><span style=\"color: #004000;\">FETCH_ASSOC<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #009900;\">{<\/span>\r\n        <span style=\"color: #b1b100;\">echo<\/span> <span style=\"color: #0000ff;\">'ID: '<\/span> <span style=\"color: #339933;\">.<\/span> <a href=\"http:\/\/www.php.net\/htmlspecialchars\"><span style=\"color: #990000;\">htmlspecialchars<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$row<\/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 style=\"color: #0000ff;\">', \u0418\u043c\u044f: '<\/span> <span style=\"color: #339933;\">.<\/span> <a href=\"http:\/\/www.php.net\/htmlspecialchars\"><span style=\"color: #990000;\">htmlspecialchars<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$row<\/span><span style=\"color: #009900;\">[<\/span><span style=\"color: #0000ff;\">'name'<\/span><span style=\"color: #009900;\">]<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #339933;\">.<\/span> <span style=\"color: #0000ff;\">'&lt;br&gt;'<\/span><span style=\"color: #339933;\">;<\/span>\r\n    <span style=\"color: #009900;\">}<\/span>\r\n<span style=\"color: #009900;\">}<\/span> catch <span style=\"color: #009900;\">(<\/span>PDOException <span style=\"color: #000088;\">$e<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #009900;\">{<\/span>\r\n    <span style=\"color: #666666; font-style: italic;\">\/\/ \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0443 \u043f\u0438\u0448\u0443\u0442 \u0432 \u043b\u043e\u0433, \u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0435\u0439\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435<\/span>\r\n    <a href=\"http:\/\/www.php.net\/error_log\"><span style=\"color: #990000;\">error_log<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$e<\/span><span style=\"color: #339933;\">-&gt;<\/span><span style=\"color: #004000;\">getMessage<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\r\n    <span style=\"color: #b1b100;\">echo<\/span> <span style=\"color: #0000ff;\">'\u041f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445.'<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #009900;\">}<\/span>\r\n<\/pre>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u0447\u0430\u0441\u0442\u0430\u044f: \u0435\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0430, \u043d\u0430\u0434\u043e \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0440\u043e\u043a \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439: ID \u0438 \u0438\u043c\u044f. \u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043f\u043e \u0448\u0430\u0433\u0430\u043c, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0437\u0430 \u0447\u0435\u043c \u0438\u0434\u0451\u0442 \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u0435 \u0447\u0435\u0440\u0435\u0437 PDO php $dsn = &#8216;mysql:host=localhost;dbname=testdb;charset=utf8mb4&#8217;; $user = &#8216;db_user&#8217;; $pass = &#8216;db_pass&#8217;; \u00a0 $pdo = new PDO($dsn, $user, $pass, [ [&hellip;]<\/p>\n","protected":false},"author":9194254,"featured_media":135301,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[183],"tags":[],"class_list":["post-135310","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php"],"views":8,"_links":{"self":[{"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/135310","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/users\/9194254"}],"replies":[{"embeddable":true,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=135310"}],"version-history":[{"count":1,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/135310\/revisions"}],"predecessor-version":[{"id":135311,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/135310\/revisions\/135311"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/135301"}],"wp:attachment":[{"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=135310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=135310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=135310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}