mysql_connect('localhost', 'nobody', 'nobody'); mysql_Select_db('getflogs'); $res = mysql_query("select (select count(*) from foto where sq_fotolog = 8) as this, (select count(*) from foto) as everything"); print_r(mysql_fetch_assoc($res)); echo PHP_VERSION; /* Array ( [this] => 772 [everything] => 38855 ) 5.2.0-10 */