I have a union type query. How can I count the number of rows it queries?
mysql_query(
" (SELECT 1 as sort_col,performerid,pic0
FROM $table
WHERE performerid IS NOT NULL $performeridSql)
UNION
(SELECT 2 as sort_col,performerid,pic0
FROM $table
WHERE performerid IS NOT NULL
$categorySql $buildSql
$breastsize $haircolor $age $ethnicity
$willingnessSql)
ORDER BY sort_col");
Simply count the subquery results…