TalkingTom, попробуй так $clib = mysql_result(mysql_query("select count(*) from lib where author = '" . $login . "'), 0);