即使在阅读了所有相关主题之后,也没有任何帮助:
$q="select count(*) from (
SELECT COUNT(*) AS total
FROM clips
WHERE ((dimensions like('%concert%') AND dimensions NOT like('concert'))
OR (file_format like('%concert%') AND file_format NOT like('concert')))
UNION DISTINCT
SELECT COUNT(*) AS total
FROM clips
WHERE (dimensions like('concert') OR file_format like('concert'))
) AS num";
$q2 = mysql_query($q) or die(mysql_error());
$q3 = mysql_fetch_array($q2);
echo $q3['num'];
我得到的错误:
注意:未定义的索引:num in .... on line ..
我究竟做错了什么?