SELECT * FROM ad, user WHERE user.userID = ad.userID AND adID = favicon.ico;
Неправильный запрос