[10501] PDOException in Connection.php line 689

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IN (?,?,?) LIMIT 1' at line 1

  1. $this->debug(false, '', $master);
  2. // 返回结果集
  3. return $this->getResult($pdo, $procedure);
  4. } catch (\PDOException $e) {
  5. if ($this->isBreak($e)) {
  6. return $this->close()->query($sql, $bind, $master, $pdo);
  7. }
  8. throw new PDOException($e, $this->config, $this->getLastsql());
  9. } catch (\Throwable $e) {
  10. if ($this->isBreak($e)) {
  11. return $this->close()->query($sql, $bind, $master, $pdo);
  12. }
  13. throw $e;
  14. } catch (\Exception $e) {
  15. if ($this->isBreak($e)) {
  16. return $this->close()->query($sql, $bind, $master, $pdo);

Call Stack

  1. in Connection.php line 689
  2. at Connection->query('SELECT COUNT(*) AS t...', ['ThinkBind_1_' => [1, 2], 'ThinkBind_2_' => [1, 2], 'ThinkBind_3_' => [2, 2], ...], false, true) in Connection.php line 1297
  3. at Connection->value(object(Query), ['COUNT(*) AS tp_count'], 0) in Connection.php line 1325
  4. at Connection->aggregate(object(Query), 'COUNT', 'COUNT(*) AS tp_count') in Query.php line 623
  5. at Query->aggregate('COUNT', '*', true) in Query.php line 658
  6. at Query->count() in Query.php line 1782
  7. at Query->paginate(10) in Shops.php line 75
  8. at Shops->pageQuery(10) in Shops.php line 86
  9. at Shops->shopStreet()
  10. at ReflectionMethod->invokeArgs(object(Shops), []) in Container.php line 395
  11. at Container->invokeReflectMethod(object(Shops), object(ReflectionMethod), ['keyword' => '家家矿业', 'convert' => false]) in Module.php line 132
  12. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  13. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  14. at Middleware->think\{closure}(object(Request))
  15. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  16. at Middleware->dispatch(object(Request), 'controller') in Module.php line 137
  17. at Module->exec() in Dispatch.php line 168
  18. at Dispatch->run() in App.php line 432
  19. at App->think\{closure}(object(Request), object(Closure), null)
  20. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  21. at Middleware->think\{closure}(object(Request))
  22. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  23. at Middleware->dispatch(object(Request)) in App.php line 435
  24. at App->run() in index.php line 25