There is a syntax error in your query. The error is occurring because you have an extra closing parenthesis before the 'AS taskExecuting'.

Here is the corrected query:

SELECT COUNT() AS taskAccomplish, (SELECT COUNT() FROM users WHERE status = 1) AS taskPending, (SELECT COUNT() FROM users WHERE status = 2) AS taskExecuting, (SELECT COUNT() FROM users WHERE status = 4) AS taskDel, (SELECT COUNT(*) FROM users WHERE status = 5) AS taskSuspend FROM users WHERE status = 3

SQL Syntax Error: 'You have an error in your SQL syntax...' - MariaDB

原文地址: https://www.cveoy.top/t/topic/o33k 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录