如何在定义时根据它的其他参数分配对象的参数?
我想将$universalQuery_Count
分配给$MySQL_Count
& $sqlServer_Count
with:
class ProductList {
protected $universalQuery_Count = "
SELECT
COUNT(*)
FROM
table
WHERE
table.type= :type
",
$MySQL_Count = $universalQuery_Count,
$sqlServer_Count = $universalQuery_Count;
}
但是
Parse error: syntax error, unexpected '$universalQuery_Count' (T_VARIABLE)