<?php
require_once('includes/auth.php');
function getMarkets(){
$count_markets=querydb("SELECT count(*) as marketcount from markets ");
$result=$count_markets('marketcount');
return $result;
}
我有上面的代码,我收到以下错误:
致命错误:函数名称必须是字符串
答案 0 :(得分:2)
看到错误正在使用$count_markets('marketcount');
而不是$count_markets['marketcount'];
答案 1 :(得分:0)
$result=$count_markets('marketcount');
- 从$
移除count_markets
。