我在服务器中执行了此查询并获得了
$query1="select clients.name AS client,
packages.pick AS pick,
packages.drop AS `drop`,
packages.created AS created,
packages.status AS status,
packages.id AS id,
packages.name AS package
from (packages join clients on(clients.id = packages.client_id))";
$result = $mysqli->query("select count(*) as num from ($query1)");
我得到了上述错误,知道导致错误的原因是什么?
答案 0 :(得分:4)
要命名子查询:
from ($query1) as SubQueryAlias