SELECT * FROM ad, user WHERE user.userID = ad.userID AND adID = registr;

Неправильный запрос