Magento 2后端客户网格错误"出了问题"控制台中的SQL错误

时间:2016-10-07 12:04:07

标签: sql magento

突然我的magento版本2.1.1后端客户网格无法显示错误 "出了点问题" 我在控制台

中看到了以下SQL错误
2 exception(s):

异常#0(Zend_Db_Statement_Exception):SQLSTATE [42000]:语法错误或访问冲突:1064语法  错误,意外的$ end,期待FTS_TERM或FTS_NUMB或' *',查询是:

SELECT COUNT(*) FROM `customer_grid_flat
` AS `main_table` WHERE (MATCH(`main_table`.name,`main_table`.email,`main_table`.created_in,`main_table
`.taxvat,`main_table`.billing_full,`main_table`.billing_firstname,`main_table`.billing_lastname,`main_table
`.billing_telephone,`main_table`.billing_postcode,`main_table`.billing_region,`main_table`.billing_city
,`main_table`.billing_fax,`main_table`.billing_company,`main_table`.shipping_full) AGAINST('*'))

异常#1(PDOException):SQLSTATE [42000]:语法错误或访问冲突:1064语法错误,意外  $ end,期待FTS_TERM或FTS_NUMB或' *'

异常#0(Zend_Db_Statement_Exception):SQLSTATE [42000]:语法错误或访问冲突:1064语法  错误,意外的$ end,期待FTS_TERM或FTS_NUMB或' *',查询是:

SELECT COUNT(*) FROM `customer_grid_flat
` AS `main_table` WHERE (MATCH(`main_table`.name,`main_table`.email,`main_table`.created_in,`main_table
`.taxvat,`main_table`.billing_full,`main_table`.billing_firstname,`main_table`.billing_lastname,`main_table
`.billing_telephone,`main_table`.billing_postcode,`main_table`.billing_region,`main_table`.billing_city
,`main_table`.billing_fax,`main_table`.billing_company,`main_table`.shipping_full) AGAINST('*'))

错误:

#0 E:\xmp56\htdocs\publive\vendor\magento\framework\DB\Statement\Pdo\Mysql.php(95): Zend_Db_Statement_Pdo-
>_execute(Array)
#1 E:\xmp56\htdocs\publive\vendor\magento\zendframework1\library\Zend\Db\Statement.php(303): Magento
\Framework\DB\Statement\Pdo\Mysql->_execute(Array)
#2 E:\xmp56\htdocs\publive\vendor\magento\zendframework1\library\Zend\Db\Adapter\Abstract.php(480): Zend_Db_Statement-
>execute(Array)
#3 E:\xmp56\htdocs\publive\vendor\magento\zendframework1\library\Zend\Db\Adapter\Pdo\Abstract.php(238
): Zend_Db_Adapter_Abstract->query('SELECT COUNT(*)...', Array)
#4 E:\xmp56\htdocs\publive\vendor\magento\framework\DB\Adapter\Pdo\Mysql.php(452): Zend_Db_Adapter_Pdo_Abstract-
>query('SELECT COUNT(*)...', Array)
#5 E:\xmp56\htdocs\publive\vendor\magento\framework\DB\Adapter\Pdo\Mysql.php(507): Magento\Framework
\DB\Adapter\Pdo\Mysql->_query(Object(Magento\Framework\DB\Select), Array)
#6 E:\xmp56\htdocs\publive\vendor\magento\zendframework1\library\Zend\Db\Adapter\Abstract.php(828): Magento
\Framework\DB\Adapter\Pdo\Mysql->query(Object(Magento\Framework\DB\Select), Array)
#7 E:\xmp56\htdocs\publive\vendor\magento\framework\Data\Collection\AbstractDb.php(218): Zend_Db_Adapter_Abstract-
>fetchOne(Object(Magento\Framework\DB\Select), Array)
#8 E:\xmp56\htdocs\publive\vendor\magento\framework\Data\Collection.php(259): Magento\Framework\Data
\Collection\AbstractDb->getSize()
#9 E:\xmp56\htdocs\publive\vendor\magento\framework\Data\Collection.php(245): Magento\Framework\Data
\Collection->getLastPageNumber()
#10 E:\xmp56\htdocs\publive\vendor\magento\framework\Data\Collection\AbstractDb.php(516): Magento\Framework
\Data\Collection->getCurPage()
#11 E:\xmp56\htdocs\publive\vendor\magento\framework\Data\Collection\AbstractDb.php(570): Magento\Framework
\Data\Collection\AbstractDb->_renderLimit()
#12 E:\xmp56\htdocs\publive\vendor\magento\framework\Data\Collection\AbstractDb.php(557): Magento\Framework
\Data\Collection\AbstractDb->loadWithFilter(false, false)
#13 E:\xmp56\htdocs\publive\vendor\magento\framework\Data\Collection.php(333): Magento\Framework\Data
\Collection\AbstractDb->load()
#14 E:\xmp56\htdocs\publive\vendor\magento\framework\View\Element\UiComponent\DataProvider\DataProvider
.php(250): Magento\Framework\Data\Collection->getItems()
#15 E:\xmp56\htdocs\publive\vendor\magento\framework\View\Element\UiComponent\DataProvider\DataProvider
.php(284): Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider->searchResultToOutput
(Object(Magento\Customer\Model\ResourceModel\Grid\Collection))
#16 E:\xmp56\htdocs\publive\vendor\magento\module-customer\Ui\Component\DataProvider.php(66): Magento
\Framework\View\Element\UiComponent\DataProvider\DataProvider->getData()
#17 E:\xmp56\htdocs\publive\vendor\magento\module-ui\Component\Listing.php(37): Magento\Customer\Ui\Component
\DataProvider->getData()
#18 E:\xmp56\htdocs\publive\vendor\magento\framework\View\Element\UiComponent\Context.php(227): Magento
\Ui\Component\Listing->getDataSourceData()
#19 E:\xmp56\htdocs\publive\vendor\magento\framework\View\Element\UiComponent\ContentType\Json.php(69
): Magento\Framework\View\Element\UiComponent\Context->getDataSourceData(Object(Magento\Ui\Component
\Listing))
#20 E:\xmp56\htdocs\publive\vendor\magento\module-ui\Component\AbstractComponent.php(155): Magento\Framework
\View\Element\UiComponent\ContentType\Json->render(Object(Magento\Ui\Component\Listing), 'templates/listi
...')
#21 E:\xmp56\htdocs\publive\vendor\magento\module-ui\Controller\Adminhtml\Index\Render.php(32): Magento
\Ui\Component\AbstractComponent->render()
#22 E:\xmp56\htdocs\publive\var\generation\Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor.php
(24): Magento\Ui\Controller\Adminhtml\Index\Render->execute()
#23 E:\xmp56\htdocs\publive\vendor\magento\framework\App\Action\Action.php(102): Magento\Ui\Controller
\Adminhtml\Index\Render\Interceptor->execute()
#24 E:\xmp56\htdocs\publive\vendor\magento\module-backend\App\AbstractAction.php(226): Magento\Framework
\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#25 E:\xmp56\htdocs\publive\vendor\magento\framework\Interception\Interceptor.php(74): Magento\Backend
\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#26 E:\xmp56\htdocs\publive\vendor\magento\framework\Interception\Chain\Chain.php(70): Magento\Ui\Controller
\Adminhtml\Index\Render\Interceptor->___callParent('dispatch', Array)
#27 E:\xmp56\htdocs\publive\vendor\magento\framework\Interception\Chain\Chain.php(63): Magento\Framework
\Interception\Chain\Chain->invokeNext('Magento\\Ui\\Cont...', 'dispatch', Object(Magento\Ui\Controller
\Adminhtml\Index\Render\Interceptor), Array, 'adminAuthentica...')
#28 E:\xmp56\htdocs\publive\vendor\magento\module-backend\App\Action\Plugin\Authentication.php(143):
 Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento
\Framework\App\Request\Http))
#29 E:\xmp56\htdocs\publive\vendor\magento\framework\Interception\Chain\Chain.php(67): Magento\Backend
\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Ui\Controller\Adminhtml\Index\Render
\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#30 E:\xmp56\htdocs\publive\vendor\magento\framework\Interception\Interceptor.php(138): Magento\Framework
\Interception\Chain\Chain->invokeNext('Magento\\Ui\\Cont...', 'dispatch', Object(Magento\Ui\Controller
\Adminhtml\Index\Render\Interceptor), Array, 'adminMassaction...')
#31 E:\xmp56\htdocs\publive\vendor\magento\module-backend\App\Action\Plugin\MassactionKey.php(33): Magento
\Ui\Controller\Adminhtml\Index\Render\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento
\Framework\App\Request\Http))
#32 E:\xmp56\htdocs\publive\vendor\magento\framework\Interception\Interceptor.php(142): Magento\Backend
\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Ui\Controller\Adminhtml\Index\Render
\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#33 E:\xmp56\htdocs\publive\var\generation\Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor.php
(52): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->___callPlugins('dispatch', Array, Array
)
#34 E:\xmp56\htdocs\publive\vendor\magento\framework\App\FrontController.php(55): Magento\Ui\Controller
\Adminhtml\Index\Render\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#35 E:\xmp56\htdocs\publive\vendor\magento\framework\Interception\Interceptor.php(74): Magento\Framework
\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#36 E:\xmp56\htdocs\publive\vendor\magento\framework\Interception\Chain\Chain.php(70): Magento\Framework
\App\FrontController\Interceptor->___callParent('dispatch', Array)
#37 E:\xmp56\htdocs\publive\vendor\magento\framework\Interception\Interceptor.php(138): Magento\Framework
\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App
\FrontController\Interceptor), Array, 'install')
#38 E:\xmp56\htdocs\publive\vendor\magento\framework\Module\Plugin\DbStatusValidator.php(69): Magento
\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework
\App\Request\Http))
#39 E:\xmp56\htdocs\publive\vendor\magento\framework\Interception\Interceptor.php(142): Magento\Framework
\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor
), Object(Closure), Object(Magento\Framework\App\Request\Http))
#40 E:\xmp56\htdocs\publive\var\generation\Magento\Framework\App\FrontController\Interceptor.php(26)
: Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#41 E:\xmp56\htdocs\publive\vendor\magento\framework\App\Http.php(135): Magento\Framework\App\FrontController
\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#42 E:\xmp56\htdocs\publive\vendor\magento\framework\App\Bootstrap.php(258): Magento\Framework\App\Http-
>launch()
#43 E:\xmp56\htdocs\publive\index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework
\App\Http))
#44 {main}

Exception #1 (PDOException): SQLSTATE[42000]: Syntax error or access violation: 1064 syntax error, unexpected
 $end, expecting FTS_TERM or FTS_NUMB or '*'
#0 E:\xmp56\htdocs\publive\vendor\magento\zendframework1\library\Zend\Db\Statement\Pdo.php(228): PDOStatement-
>execute(Array)
#1 E:\xmp56\htdocs\publive\vendor\magento\framework\DB\Statement\Pdo\Mysql.php(95): Zend_Db_Statement_Pdo-
>_execute(Array)
#2 E:\xmp56\htdocs\publive\vendor\magento\zendframework1\library\Zend\Db\Statement.php(303): Magento
\Framework\DB\Statement\Pdo\Mysql->_execute(Array)
#3 E:\xmp56\htdocs\publive\vendor\magento\zendframework1\library\Zend\Db\Adapter\Abstract.php(480): Zend_Db_Statement-
>execute(Array)
#4 E:\xmp56\htdocs\publive\vendor\magento\zendframework1\library\Zend\Db\Adapter\Pdo\Abstract.php(238
): Zend_Db_Adapter_Abstract->query('SELECT COUNT(*)...', Array)
#5 E:\xmp56\htdocs\publive\vendor\magento\framework\DB\Adapter\Pdo\Mysql.php(452): Zend_Db_Adapter_Pdo_Abstract-
>query('SELECT COUNT(*)...', Array)
#6 E:\xmp56\htdocs\publive\vendor\magento\framework\DB\Adapter\Pdo\Mysql.php(507): Magento\Framework
\DB\Adapter\Pdo\Mysql->_query(Object(Magento\Framework\DB\Select), Array)
#7 E:\xmp56\htdocs\publive\vendor\magento\zendframework1\library\Zend\Db\Adapter\Abstract.php(828): Magento
\Framework\DB\Adapter\Pdo\Mysql->query(Object(Magento\Framework\DB\Select), Array)
#8 E:\xmp56\htdocs\publive\vendor\magento\framework\Data\Collection\AbstractDb.php(218): Zend_Db_Adapter_Abstract-
>fetchOne(Object(Magento\Framework\DB\Select), Array)
#9 E:\xmp56\htdocs\publive\vendor\magento\framework\Data\Collection.php(259): Magento\Framework\Data
\Collection\AbstractDb->getSize()
#10 E:\xmp56\htdocs\publive\vendor\magento\framework\Data\Collection.php(245): Magento\Framework\Data
\Collection->getLastPageNumber()
#11 E:\xmp56\htdocs\publive\vendor\magento\framework\Data\Collection\AbstractDb.php(516): Magento\Framework
\Data\Collection->getCurPage()
#12 E:\xmp56\htdocs\publive\vendor\magento\framework\Data\Collection\AbstractDb.php(570): Magento\Framework
\Data\Collection\AbstractDb->_renderLimit()
#13 E:\xmp56\htdocs\publive\vendor\magento\framework\Data\Collection\AbstractDb.php(557): Magento\Framework
\Data\Collection\AbstractDb->loadWithFilter(false, false)
#14 E:\xmp56\htdocs\publive\vendor\magento\framework\Data\Collection.php(333): Magento\Framework\Data
\Collection\AbstractDb->load()
#15 E:\xmp56\htdocs\publive\vendor\magento\framework\View\Element\UiComponent\DataProvider\DataProvider
.php(250): Magento\Framework\Data\Collection->getItems()
#16 E:\xmp56\htdocs\publive\vendor\magento\framework\View\Element\UiComponent\DataProvider\DataProvider
.php(284): Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider->searchResultToOutput
(Object(Magento\Customer\Model\ResourceModel\Grid\Collection))
#17 E:\xmp56\htdocs\publive\vendor\magento\module-customer\Ui\Component\DataProvider.php(66): Magento
\Framework\View\Element\UiComponent\DataProvider\DataProvider->getData()
#18 E:\xmp56\htdocs\publive\vendor\magento\module-ui\Component\Listing.php(37): Magento\Customer\Ui\Component
\DataProvider->getData()
#19 E:\xmp56\htdocs\publive\vendor\magento\framework\View\Element\UiComponent\Context.php(227): Magento
\Ui\Component\Listing->getDataSourceData()
#20 E:\xmp56\htdocs\publive\vendor\magento\framework\View\Element\UiComponent\ContentType\Json.php(69
): Magento\Framework\View\Element\UiComponent\Context->getDataSourceData(Object(Magento\Ui\Component
\Listing))
#21 E:\xmp56\htdocs\publive\vendor\magento\module-ui\Component\AbstractComponent.php(155): Magento\Framework
\View\Element\UiComponent\ContentType\Json->render(Object(Magento\Ui\Component\Listing), 'templates/listi
...')
#22 E:\xmp56\htdocs\publive\vendor\magento\module-ui\Controller\Adminhtml\Index\Render.php(32): Magento
\Ui\Component\AbstractComponent->render()
#23 E:\xmp56\htdocs\publive\var\generation\Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor.php
(24): Magento\Ui\Controller\Adminhtml\Index\Render->execute()
#24 E:\xmp56\htdocs\publive\vendor\magento\framework\App\Action\Action.php(102): Magento\Ui\Controller
\Adminhtml\Index\Render\Interceptor->execute()
#25 E:\xmp56\htdocs\publive\vendor\magento\module-backend\App\AbstractAction.php(226): Magento\Framework
\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#26 E:\xmp56\htdocs\publive\vendor\magento\framework\Interception\Interceptor.php(74): Magento\Backend
\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#27 E:\xmp56\htdocs\publive\vendor\magento\framework\Interception\Chain\Chain.php(70): Magento\Ui\Controller
\Adminhtml\Index\Render\Interceptor->___callParent('dispatch', Array)
#28 E:\xmp56\htdocs\publive\vendor\magento\framework\Interception\Chain\Chain.php(63): Magento\Framework
\Interception\Chain\Chain->invokeNext('Magento\\Ui\\Cont...', 'dispatch', Object(Magento\Ui\Controller
\Adminhtml\Index\Render\Interceptor), Array, 'adminAuthentica...')
#29 E:\xmp56\htdocs\publive\vendor\magento\module-backend\App\Action\Plugin\Authentication.php(143):
 Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento
\Framework\App\Request\Http))
#30 E:\xmp56\htdocs\publive\vendor\magento\framework\Interception\Chain\Chain.php(67): Magento\Backend
\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Ui\Controller\Adminhtml\Index\Render
\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#31 E:\xmp56\htdocs\publive\vendor\magento\framework\Interception\Interceptor.php(138): Magento\Framework
\Interception\Chain\Chain->invokeNext('Magento\\Ui\\Cont...', 'dispatch', Object(Magento\Ui\Controller
\Adminhtml\Index\Render\Interceptor), Array, 'adminMassaction...')
#32 E:\xmp56\htdocs\publive\vendor\magento\module-backend\App\Action\Plugin\MassactionKey.php(33): Magento
\Ui\Controller\Adminhtml\Index\Render\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento
\Framework\App\Request\Http))
#33 E:\xmp56\htdocs\publive\vendor\magento\framework\Interception\Interceptor.php(142): Magento\Backend
\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Ui\Controller\Adminhtml\Index\Render
\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#34 E:\xmp56\htdocs\publive\var\generation\Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor.php
(52): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->___callPlugins('dispatch', Array, Array
)
#35 E:\xmp56\htdocs\publive\vendor\magento\framework\App\FrontController.php(55): Magento\Ui\Controller
\Adminhtml\Index\Render\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#36 E:\xmp56\htdocs\publive\vendor\magento\framework\Interception\Interceptor.php(74): Magento\Framework
\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#37 E:\xmp56\htdocs\publive\vendor\magento\framework\Interception\Chain\Chain.php(70): Magento\Framework
\App\FrontController\Interceptor->___callParent('dispatch', Array)
#38 E:\xmp56\htdocs\publive\vendor\magento\framework\Interception\Interceptor.php(138): Magento\Framework
\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App
\FrontController\Interceptor), Array, 'install')
#39 E:\xmp56\htdocs\publive\vendor\magento\framework\Module\Plugin\DbStatusValidator.php(69): Magento
\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework
\App\Request\Http))
#40 E:\xmp56\htdocs\publive\vendor\magento\framework\Interception\Interceptor.php(142): Magento\Framework
\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor
), Object(Closure), Object(Magento\Framework\App\Request\Http))
#41 E:\xmp56\htdocs\publive\var\generation\Magento\Framework\App\FrontController\Interceptor.php(26)
: Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#42 E:\xmp56\htdocs\publive\vendor\magento\framework\App\Http.php(135): Magento\Framework\App\FrontController
\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#43 E:\xmp56\htdocs\publive\vendor\magento\framework\App\Bootstrap.php(258): Magento\Framework\App\Http-
>launch()
#44 E:\xmp56\htdocs\publive\index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework
\App\Http))
#45 {main}

2 个答案:

答案 0 :(得分:2)

在Ui_Bookmark表中删除与customer_listing相关的条目修复了错误

答案 1 :(得分:0)

MATCH子句中没有WHERE运算符。

WHERE子句必须是这样的:

WHERE MyTable.AField = <somevalue>

您可以将=换为><<>LIKE,但必须有运营商。您上面的查询没有。