///Send mail to members whom subscribed to receive mail
$one = 1;
settype($one, 'integer');
$two = 2;
settype($two, 'integer');
$query_news_mail = "SELECT M.id, M.j_email, M.j_news_alert, M.j_news_catid_notification FROM jt_members M WHERE (M.j_news_alert = $two AND M.j_news_catid_notification = $data[catid]) AND M.j_news_alert = $one;";
$mail_result = mysql_query($query_news_mail) or die(trigger_error(MYSQL_ERROR_MSG,E_USER_ERROR));
while($row_mail = mysql_fetch_assoc($mail_result)) {
//start sending mails here
echo "mail";
}
The second clause does not execute //M.j_news_alert = $one
Any ides?
Thanks
Maybe you meant
Otherwise you cannot meet your WHERE condition:
M.j_news_alert = $two AND M.j_news_alert = $one;