我使用CED扩展开发了适用于magento市场的市场网站。我的网站几天前工作,但现在我在供应商商店页面面临奇怪的问题,它显示错误网站的其余工作正常。 当我打开页面时,它显示语法错误
SQLSTATE [42000]:语法错误或访问冲突:1064您有 SQL语法错误;查看与您的手册相对应的手册 MySQL服务器版本,用于在'1 = 1 AND附近使用正确的语法( e.website_id ='1')AND(e.customer_group_id ='1')AND (e.min_price'在第2行
查询是:
from urllib import request
from urllib import error
from base64 import b64encode
def request_release_info(self):
# build authorization
user_and_pass = b64encode(b"username:password").decode("ascii")
# first, we build request
my_req = request.Request('https://api.github.com/repos/user/repo/releases/latest')
# then attach auth header
my_req.add_header('Authorization', 'Basic %s' % user_and_pass)
# and after that try to execute it
try:
content = request.urlopen(my_req)
except error.HTTPError:
content = "add error processing, example for wrong log/password"
return content
任何人都可以告诉我问题在哪里
答案 0 :(得分:0)
删除1=1
两次(WHERE
之后的第一个IN
列表之后的第二个):
SELECT FLOOR((ROUND((e.min_price) * 1, 2)) / 100) + 1 AS range,
COUNT(*) AS COUNT
FROM mage_catalog_product_index_price AS e
JOIN mage_catalog_category_product_index AS cat_index
ON cat_index.product_id=e.entity_id
AND cat_index.store_id='1'
AND cat_index.visibility IN(2, 4)
AND cat_index.category_id = '2'
WHERE e.entity_id IN('1749', '1750', '1751', '1752', '1753', '1754', '1755', '1756', '1757', '1758', '1759', '1760', '1761', '1762', '1763', '1764', '1765', '1766', '1767', '1768', '1769', '1770', '1771', '1772', '1773', '1774', '1775', '1776', '1777', '1778', '1779', '1780', '1781', '1782', '1783', '1784', '1785', '1786', '1787', '1788', '1789', '1790', '1791', '1792', '1793', '1794', '1795', '1796', '1797', '1798', '1799', '1800', '1801', '1802', '1803', '1804', '1805', '1806', '1807', '1809', '1810', '1811', '1812', '1813', '1814', '1815', '1816', '1817', '1818', '1819', '1820', '1821', '1822', '1824', '1825', '1826', '1827', '1828', '1829', '1830', '1831', '1832', '1833', '1834', '1836', '1837', '1838', '1839', '1840', '1841', '1842', '1843', '1844', '1845', '1846', '1847', '1848', '1849', '1850', '1851', '1852', '1853', '1854', '1855', '1856', '1876', '1877', '1878', '1879', '1880', '1881', '1882', '1892', '1893', '1894', '1895', '1896', '1897', '1898', '1899', '1900', '1901', '1902', '1903', '1904', '1905')
AND e.website_id = '1'
AND e.customer_group_id = '1'
AND e.min_price IS NOT NULL
GROUP BY FLOOR((ROUND((e.min_price) * 1, 2)) / 100) + 1
ORDER BY range ASC