0

我在我的服务器中执行了这个查询并得到了

$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)");

我得到了上述错误,知道是什么导致了错误吗?

4

1 回答 1

4

必须命名子查询:

from ($query1) as SubQueryAlias
于 2013-06-20T12:33:30.297 回答