列フィールドに特定の文字列が含まれているレコードを数えようとしています。基準が満たされたレコードを集計する
これが私のクエリです:
$em = $this->getDoctrine()->getEntityManager();
$query = $em->createQueryBuilder()
->select("count(e.$column)")
->from("AppBundle:$table", "e")
->where("e.urlid LIKE \"-test\"")
->getQuery();
$occurences = $query->getSingleScalarResult();
私は、MySQLのマニュアルクエリを実行するので、それはおそらく、教義のことだときに動作します。私は教義からこのエラーを得ています:
[Syntax Error] line 0, col 66: Error: Expected StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression, got '"'
何か助けていただければ幸いです!