Jump to content

Pawlowski

Новичок
  • Content Count

    26
  • Joined

  • Last visited

Community Reputation

0 Обычный

About Pawlowski

  • Rank
    Пользователь

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Uncaught Exception: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ON (pd.product_id = p2s.product_id) WHERE pd.product_id ='42' AND p2s.store_i' at line 1<br />Error No: 1064<br />SELECT * FROM oc_product_description pd LEFT JOIN oc_product_to_store p2s ON (pd.product_id = p2s.product_id) WHERE pd.product_id ='42' AND p2s.store_id = '0' AND pd.language_id = '2' in D:\xampp\htdocs\opencart\system\library\db\mysqli.php:40 Stack trace: #0 D:\xampp\htdocs\opencart\system\library\db.php(45): DB\MySQLi->query('SELECT * FROM o...') #1 D:\xampp\htdocs\opencart\catalog\model\catalog\product.php(395): DB->query('SELECT * FROM o...') #2 D:\xampp\htdocs\opencart\system\storage\modification\system\engine\loader.php(248): ModelCatalogProduct->getAltName(42) #3 D:\xampp\htdocs\opencart\system\engine\proxy.php(47): Loader->{closure}(Array, Array) #4 D:\xampp\htdocs\opencart\catalog\controller\product\product.php(247): Prox in D:\xampp\htdocs\opencart\system\library\db\mysqli.php on line 40
  2. public function getAltName($product_id) { ; $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_description pd LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (pd.alt_name = p2s.store_id) WHERE pd.product_id ='" . (int)$product_id. "' AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND language_id = '" . (int)$this->config->get('config_language_id') . "'"); return $query->row['alt_name']; } Случайно написал... Вот сейчас у меня такой запрос. И вот такая ошибка Fatal error: Uncaught Exception: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ON (pd.alt_name = p2s.store_id) WHERE pd.product_id ='42' AND p2s.store_id = ' at line 1<br />Error No: 1064<br />SELECT * FROM oc_product_description pd LEFT JOIN oc_product_to_store p2s ON (pd.alt_name = p2s.store_id) WHERE pd.product_id ='42' AND p2s.store_id = '0' AND language_id = '2' in D:\xampp\htdocs\opencart\system\library\db\mysqli.php:40 Stack trace: #0 D:\xampp\htdocs\opencart\system\library\db.php(45): DB\MySQLi->query('SELECT * FROM o...') #1 D:\xampp\htdocs\opencart\catalog\model\catalog\product.php(395): DB->query('SELECT * FROM o...') #2 D:\xampp\htdocs\opencart\system\storage\modification\system\engine\loader.php(248): ModelCatalogProduct->getAltName(42) #3 D:\xampp\htdocs\opencart\system\engine\proxy.php(47): Loader->{closure}(Array, Array) #4 D:\xampp\htdocs\opencart\catalog\controller\product\product.php(247): Proxy->__ca in D:\xampp\htdocs\opencart\system\library\db\mysqli.php on line 40
  3. public function getAltName($product_id) { ; $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_description pd LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (pd.product_id = p2s.store_id) WHERE pd.product_id ='" . (int)$product_id. "' AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND language_id = '" . (int)$this->config->get('config_language_id') . "'"); return $query->row['alt_name']; } Тоже самое: Fatal error: Uncaught Exception: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ON (pd.product_id = p2s.store_id) WHERE pd.product_id ='42' AND p2s.sto' at line 1<br />Error No: 1064<br />SELECT * FROM oc_product_description pd LEFT JOIN oc_product_to_store p2s ON (pd.product_id = p2s.store_id) WHERE pd.product_id ='42' AND p2s.store_id = '0' AND language_id = '2' in D:\xampp\htdocs\opencart\system\library\db\mysqli.php:40 Stack trace: #0 D:\xampp\htdocs\opencart\system\library\db.php(45): DB\MySQLi->query('SELECT * FROM o...') #1 D:\xampp\htdocs\opencart\catalog\model\catalog\product.php(397): DB->query('SELECT * FROM o...') #2 D:\xampp\htdocs\opencart\system\storage\modification\system\engine\loader.php(248): ModelCatalogProduct->getAltName(42) #3 D:\xampp\htdocs\opencart\system\engine\proxy.php(47): Loader->{closure}(Array, Array) #4 D:\xampp\htdocs\opencart\catalog\controller\product\product.php(247): Pro in D:\xampp\htdocs\opencart\system\library\db\mysqli.php on line 40
  4. $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_description pd LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (pd.alt_name = p2s.store_id) WHERE pd.product_id ='" . (int)$product_id. "'AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "'AND language_id = '" . (int)$this->config->get('config_language_id') . "'"); Fatal error: Uncaught Exception: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ON (pd.alt_name = p2s.store_id) WHERE pd.product_id ='42'AND p2s.store_id = '' at line 1<br />Error No: 1064<br />SELECT * FROM oc_product_description pd LEFT JOIN oc_product_to_store p2s ON (pd.alt_name = p2s.store_id) WHERE pd.product_id ='42'AND p2s.store_id = '0'AND language_id = '2' in D:\xampp\htdocs\opencart\system\library\db\mysqli.php:40 Stack trace: #0 D:\xampp\htdocs\opencart\system\library\db.php(45): DB\MySQLi->query('SELECT * FROM o...') #1 D:\xampp\htdocs\opencart\catalog\model\catalog\product.php(395): DB->query('SELECT * FROM o...') #2 D:\xampp\htdocs\opencart\system\storage\modification\system\engine\loader.php(248): ModelCatalogProduct->getAltName(42) #3 D:\xampp\htdocs\opencart\system\engine\proxy.php(47): Loader->{closure}(Array, Array) #4 D:\xampp\htdocs\opencart\catalog\controller\product\product.php(247): Proxy->__call in D:\xampp\htdocs\opencart\system\library\db\mysqli.php on line 40
  5. public function getAltName($product_id) { ; $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_description LEFT JOIN " . DB_PREFIX . "product_to_store ON (pd.alt_name = p2s.store_id) WHERE product_id ='" . (int)$product_id. "'AND store_id = '" . (int)$this->config->get('config_store_id') . "'AND language_id = '" . (int)$this->config->get('config_language_id') . "'"); return $query->row['alt_name']; } Fatal error: Uncaught Exception: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(pd.alt_name = p2s.store_id) WHERE product_id ='42'AND store_id = '0'AND languag' at line 1<br />Error No: 1064<br />SELECT * FROM oc_product_description LEFT JOIN oc_product_to_store ON (pd.alt_name = p2s.store_id) WHERE product_id ='42'AND store_id = '0'AND language_id = '2' in D:\xampp\htdocs\opencart\system\library\db\mysqli.php:40 Stack trace: #0 D:\xampp\htdocs\opencart\system\library\db.php(45): DB\MySQLi->query('SELECT * FROM o...') #1 D:\xampp\htdocs\opencart\catalog\model\catalog\product.php(395): DB->query('SELECT * FROM o...') #2 D:\xampp\htdocs\opencart\system\storage\modification\system\engine\loader.php(248): ModelCatalogProduct->getAltName(42) #3 D:\xampp\htdocs\opencart\system\engine\proxy.php(47): Loader->{closure}(Array, Array) #4 D:\xampp\htdocs\opencart\catalog\controller\product\product.php(247): Proxy->__call('getAltName', in D:\xampp\htdocs\opencart\system\library\db\mysqli.php on line 40
  6. Т.е. когда я смогу объединить две таблицы , alt_name будет выводить значение?
  7. {{ text_alt_name }} {{ alt_name }} Первое выводит как - Альтернативное имя Второе пустое Хорошо, сейчас добавлю
  8. {{ text_alt_name }} {{ alt_name }} Первое выводит как - Альтернативное имя Второе пустое Хорошо, сейчас добавлю
  9. public function getAltName($product_id) { ; $query = $this->db->query("SELECT alt_name FROM " . DB_PREFIX . "product_description WHERE product_id ='" . (int)$product_id. "'AND store_id = '" . (int)$this->config->get('config_store_id') . "'AND language_id = '" . (int)$this->config->get('config_language_id') . "'"); return $query->row['alt_name']; }
  10. Cпасибо, теперь выводиться только одно значение. Но в нужное поле все равно не вписывается...
  11. Спасибо, сейчас гляну. Возможно ли то, если я подправляю это , то в поле "Альтернативное имя" будет выводиться данные с колонки или нет?
×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.