我有一个工会类型查询。我如何计算它查询的行数?计数mysql工会类型查询
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");
IS NOT NULL之后,所有这些变量的含义是什么? – 2011-12-20 18:19:43
如何做到这一点的一个例子:http://www.php.net/manual/en/function.mysql-query.php#81348或者你在寻找更多的解释计划? – 2011-12-20 18:20:08
请注意,mysql扩展已过时,正在弃用。应该使用PDO或mysqli,这两种方法都有很多优点,例如准备好的语句。 – outis 2011-12-20 18:20:20