{"id":419,"date":"2011-09-25T05:45:26","date_gmt":"2011-09-25T05:45:26","guid":{"rendered":"http:\/\/sbfactory.ru\/cd\/?p=419"},"modified":"2021-02-07T13:41:26","modified_gmt":"2021-02-07T13:41:26","slug":"content-downloader-%d0%bf%d0%b0%d1%80%d1%81%d0%b8%d0%bd%d0%b3-%d1%81%d1%80%d0%b0%d0%b7%d1%83-%d0%b2-mysql-%d0%b1%d0%b0%d0%b7%d1%83","status":"publish","type":"post","link":"https:\/\/sbfactory.ru\/cd\/?p=419","title":{"rendered":"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0432 MYSQL-\u0431\u0430\u0437\u0443 (\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0446\u0435\u043d \u0442\u043e\u0432\u0430\u0440\u043e\u0432, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435)"},"content":{"rendered":"<p><!--more--><\/p>\n<table>\n<tr>\n<td><img loading=\"lazy\" src=\"http:\/\/sbfactory.ru\/cd\/wp-content\/uploads\/2011\/09\/logo-mysql-170x115.png\" alt=\"\" width=\"170\" height=\"115\" class=\"alignleft size-full wp-image-1758\" style=\"margin-right:15px\"\/>\u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 MySQL-\u0431\u0430\u0437\u0443 (\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 \u0438 \u043f\u0440\u043e\u0447\u0435\u0435), \u0442\u0430\u043a \u0438 \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0431\u0430\u0437\u044b (\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0446\u0435\u043d \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445) \u0432 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430. <\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u0434\u0430 \u043d\u0430 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 PHP \u0434\u043e 7.0. \u041e\u0431\u044b\u0447\u043d\u043e, \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0430, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044e PHP \u043d\u0438\u0436\u0435 7.0 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 7.0 \u0438 \u0432\u044b\u0448\u0435!<\/strong><\/p>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441\u044b \u043a MySQL-\u0431\u0430\u0437\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PHP-\u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043a \u0448\u0430\u0431\u043b\u043e\u043d\u0443 \u0432\u044b\u0432\u043e\u0434\u0430 Content Downloader \u043f\u0440\u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0435 &#8220;\u043a\u043e\u043d\u0442\u0435\u043d\u0442&#8221;.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b Content Downloader \u0441\u0430\u043c \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u043b \u043d\u0430 FTP-\u0441\u0435\u0440\u0432\u0435\u0440 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0438\u043b\u0438 \u0444\u0430\u0439\u043b\u044b (\u043f\u0440\u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430), \u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 <strong><a href=\"http:\/\/sbfactory.ru\/cd\/?p=1619\" target=\"_blank\" rel=\"noopener\">\u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/a><\/strong>.<\/td>\n<\/tr>\n<\/table>\n<p><img loading=\"lazy\" src=\"http:\/\/sbfactory.ru\/cd\/wp-content\/uploads\/2011\/09\/MySQL.png\" alt=\"MySQL\" width=\"892\" height=\"604\" class=\"alignnone size-full wp-image-2378\" srcset=\"https:\/\/sbfactory.ru\/cd\/wp-content\/uploads\/2011\/09\/MySQL.png 892w, https:\/\/sbfactory.ru\/cd\/wp-content\/uploads\/2011\/09\/MySQL-300x203.png 300w\" sizes=\"(max-width: 892px) 100vw, 892px\" \/><\/p>\n<p>\u0413\u0434\u0435 \u043a\u0440\u0430\u0441\u043d\u044b\u043c\u0438 \u043c\u0430\u0440\u043a\u0435\u0440\u0430\u043c\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u0430\u0437\u044b (semh2_ocart1), \u0437\u0435\u043b\u0435\u043d\u044b\u043c\u0438 \u043c\u0430\u0440\u043a\u0435\u0440\u0430\u043c\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446 (oc_product), \u0441\u0438\u043d\u0438\u043c \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u043c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b (product_id), \u0430 \u043d\u0438\u0436\u0435 \u0441\u0438\u043d\u0435\u0433\u043e \u043c\u0430\u0440\u043a\u0435\u0440\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0441\u0430\u043c\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<p><iframe width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/qD1iNN2I-bM\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<p><iframe width=\"560\" height=\"315\" src=\"\/\/www.youtube.com\/embed\/PlMUhbXWA8Q?rel=0\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p><strong>\u0421\u0443\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u0430 \u043f\u0440\u043e\u0441\u0442\u0430:<\/strong><\/p>\n<p> &#8211; \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 Content Downloader PHP-\u0441\u043a\u0440\u0438\u043f\u0442\u0443 (<a href=\"http:\/\/sbfactory.ru\/cd\/?p=186\">\u043c\u0430\u043a\u0440\u043e\u0441\u043e\u043c(\u0430\u043c\u0438) PHP_SCRIPT<\/a>), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441 MySQL-\u0431\u0430\u0437\u043e\u0439<br \/>\n &#8211; \u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u0431\u0430\u0437\u0435 (\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u0432 \u043d\u0435\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u043b\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044f \u0438\u0445)<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u043c\u0435\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<pre lang=\"PHP\" line=\"1\"><?php\r\n$db = mysql_connect(\"localhost\", \"user5\", \"password5\"); #\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a MySQL \u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (user5) \u0438 \u043f\u0430\u0440\u043e\u043b\u044f (password5)\r\nmysql_select_db(\"semh2_ocart1\"); #\u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0431\u0430\u0437\u0443 semh2_ocart1\r\nmysql_query(\"SET NAMES utf8\");\r\n$_POST[id] = mysql_real_escape_string($_POST[id]); #\u044d\u043a\u0440\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043e\u0442 Content Downloader POST-\u0434\u0430\u043d\u043d\u044b\u0445 id\r\n$_POST[model] = mysql_real_escape_string($_POST[model]); #\u044d\u043a\u0440\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043e\u0442 Content Downloader POST-\u0434\u0430\u043d\u043d\u044b\u0445 model\r\nmysql_query(\"INSERT INTO oc_product (product_id, model) VALUES ('$_POST[id]', '$_POST[model]')\"); #\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 oc_product \u0441 \u043f\u043e\u043b\u044f\u043c\u0438 product_id \u0438 model (\u0433\u0434\u0435 $_POST[id] - \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f product_id, $_POST[model] - \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f model)\r\n?><\/pre>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/strong> \u0420\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 mysql_query \u0432 \u043e\u0434\u043d\u043e\u043c PHP-\u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u043c\u043d\u043e\u0433\u043e!<\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 PHP-\u0441\u043a\u0440\u0438\u043f\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430 FTP-\u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441 \u043d\u0443\u0436\u043d\u043e\u0439 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 mysql_query(INSERT) \u043a \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u0435 semh2_ocart1. \u0414\u0430\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 oc_product \u0437\u0430\u043f\u0438\u0441\u044c \u0441 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u043c\u0438 \u043f\u043e\u043b\u044f\u043c\u0438: product_id \u0438 model. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u043f\u043e\u043b\u0435\u0439 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 Content Downloader \u0432 POST-\u0434\u0430\u043d\u043d\u044b\u0445 $_POST[id] \u0438 $_POST[model] \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u044d\u0442\u0438 POST-\u0434\u0430\u043d\u043d\u044b\u0435 (id \u0438 model) \u0438\u0437 Content Downloader \u0432 PHP-\u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441 \u0431\u0430\u0437\u043e\u0439, \u043d\u0443\u0436\u043d\u043e \u0432 \u0448\u0430\u0431\u043b\u043e\u043d \u0432\u044b\u0432\u043e\u0434\u0430 Content Downloader (ctrl+2) \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u043c\u0430\u043a\u0440\u043e\u0441 PHP_SCRIPT:<\/p>\n<pre lang=\"html\" line=\"1\"><PHP_SCRIPT=http:\/\/\u0430\u0434\u0440\u0435\u0441_\u043a_\u0441\u043a\u0440\u0438\u043f\u0442\u0443>id=[FIELDVALUE]<CD_GRAN_1!>[\/FIELDVALUE]\r\nmodel=[FIELDVALUE]<CD_GRAN_2!>[\/FIELDVALUE]<\/PHP_SCRIPT><\/pre>\n<p>\u0413\u0434\u0435 &lt;CD_GRAN_1!&gt; &#8211; \u0433\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0432\u043e\u0434\u0438\u0442 id, \u0430 &lt;CD_GRAN_2!&gt; &#8211; \u0432\u044b\u0432\u043e\u0434\u0438\u0442 model. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043c\u0430\u043a\u0440\u043e\u0441\u0435 PHP_SCRIPT \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <strong><a href=\"http:\/\/sbfactory.ru\/cd\/?p=186\" target=\"_blank\" rel=\"noopener\">\u0442\u0443\u0442<\/a><\/strong><br \/>\n<BR><br \/>\n<strong>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0442\u0438\u043f\u044b MySQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f:<\/strong><\/p>\n<p>INSERT &#8211; \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 (\u0441 \u043d\u0438\u043c \u043c\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b)<br \/>\nUPDATE &#8211; \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<br \/>\nSELECT &#8211; \u0431\u0435\u0440\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<br \/>\nDELETE &#8211; \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b (<em>mysql_query (&#8220;DELETE FROM \u0442\u0430\u0431\u043b\u0438\u0446\u0430 WHERE \u0443\u0441\u043b\u043e\u0432\u0438\u0435&#8221;);<\/em>)<\/p>\n<p><strong>UPDATE:<\/strong><\/p>\n<pre lang=\"PHP\" line=\"1\">...\r\nmysql_query(\"UPDATE oc_product SET model='$_POST[model]', quantity='$_POST[quantity]' WHERE product_id='$_POST[id]'\");\r\n...<\/pre>\n<p>\u042d\u0442\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c UPDATE \u043c\u044b \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u043c \u043d\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0435\u0439 model \u0438 quantity \u0432 \u0442\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438, \u0433\u0434\u0435 product_id \u0440\u0430\u0432\u0435\u043d $_POST[id]\n<p><strong>SELECT:<\/strong><\/p>\n<pre lang=\"PHP\" line=\"1\">...\r\n$result=mysql_query(\"SELECT quantity FROM oc_product WHERE product_id='$_POST[prod_id]'\");\r\n$myrow=mysql_fetch_array($result);\r\necho($myrow['quantity']);\r\n...<\/pre>\n<p>\u042d\u0442\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c SELECT \u043c\u044b \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f quantity \u0438\u0437 \u0437\u0430\u043f\u0438\u0441\u0438 (\u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 product_id \u0440\u0430\u0432\u0435\u043d $_POST[id]) \u0442\u0430\u0431\u043b\u0438\u0446\u044b oc_product<br \/>\n<BR><br \/>\n<strong>\u041a\u0430\u043a \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 MySQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432:<\/strong><\/p>\n<pre lang=\"PHP\" line=\"1\">...\r\n$retval = mysql_query(\"UPDATE oc_product SET model='$_POST[model]', quantity='$_POST[quantity]' WHERE product_id='$_POST[prod_id]'\");\r\nif(! $retval )\r\n{\r\n  die('Could not update data: ' . mysql_error());\r\n}\r\necho \"Updated data successfully\\n\";\r\n...<\/pre>\n<span id=\"post-ratings-419\" class=\"post-ratings\" data-nonce=\"711368f318\"><img id=\"rating_419_1\" src=\"https:\/\/sbfactory.ru\/cd\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_on.gif\" alt=\"1 Star\" title=\"1 Star\" onmouseover=\"current_rating(419, 1, '1 Star');\" onmouseout=\"ratings_off(4.6, 5, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img id=\"rating_419_2\" src=\"https:\/\/sbfactory.ru\/cd\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_on.gif\" alt=\"2 Stars\" title=\"2 Stars\" onmouseover=\"current_rating(419, 2, '2 Stars');\" onmouseout=\"ratings_off(4.6, 5, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img id=\"rating_419_3\" src=\"https:\/\/sbfactory.ru\/cd\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_on.gif\" alt=\"3 Stars\" title=\"3 Stars\" onmouseover=\"current_rating(419, 3, '3 Stars');\" onmouseout=\"ratings_off(4.6, 5, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img id=\"rating_419_4\" src=\"https:\/\/sbfactory.ru\/cd\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_on.gif\" alt=\"4 Stars\" title=\"4 Stars\" onmouseover=\"current_rating(419, 4, '4 Stars');\" onmouseout=\"ratings_off(4.6, 5, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img id=\"rating_419_5\" src=\"https:\/\/sbfactory.ru\/cd\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_half.gif\" alt=\"5 Stars\" title=\"5 Stars\" onmouseover=\"current_rating(419, 5, '5 Stars');\" onmouseout=\"ratings_off(4.6, 5, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/> (\u043e\u0446\u0435\u043d\u043e\u043a: <strong>10<\/strong>, \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0431\u0430\u043b\u043b: <strong>4.60<\/strong>)<\/span><span id=\"post-ratings-419-loading\" class=\"post-ratings-loading\"><img src=\"https:\/\/sbfactory.ru\/cd\/wp-content\/plugins\/wp-postratings\/images\/loading.gif\" width=\"16\" height=\"16\" class=\"post-ratings-image\" \/>Loading...<\/span>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[10,39,5],"_links":{"self":[{"href":"https:\/\/sbfactory.ru\/cd\/index.php?rest_route=\/wp\/v2\/posts\/419"}],"collection":[{"href":"https:\/\/sbfactory.ru\/cd\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sbfactory.ru\/cd\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sbfactory.ru\/cd\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sbfactory.ru\/cd\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=419"}],"version-history":[{"count":68,"href":"https:\/\/sbfactory.ru\/cd\/index.php?rest_route=\/wp\/v2\/posts\/419\/revisions"}],"predecessor-version":[{"id":6350,"href":"https:\/\/sbfactory.ru\/cd\/index.php?rest_route=\/wp\/v2\/posts\/419\/revisions\/6350"}],"wp:attachment":[{"href":"https:\/\/sbfactory.ru\/cd\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sbfactory.ru\/cd\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sbfactory.ru\/cd\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}