PHP新手在这里;编写以下内容的最短/最干净的方法是什么(计算MYSQL列中与特定值匹配的行数,并为该总计分配变量以备将来使用)?
$matchquery = ("SELECT * FROM sampletable WHERE Organization_match_participants_contribution = 'Employer Matching contribution' AND " . $where . " = '" . $taxcode . "'");
$matchresults = mysql_query($matchquery);
$matchrows = mysql_num_rows($matchresults);