Hey guys, I'm trying to notify other members who commented under a status about the others who commented under the same status. For example, to notify me that "john commented under kevin's status" since i would have commented too. It works, but the problem is that it does not notify everyone who commented under the status, only the first person who commented is notifed about the others. How can i achieve this?
PHP Code:
$shti = mysql_fetch_array(mysql_query("SELECT shouter, shout, id FROM ibwf_shouts WHERE id='".mysql_real_escape_string($shtid)."'"));
$chorn = mysql_fetch_array(mysql_query("SELECT max(byuid) FROM ibwf_notify WHERE actid='".mysql_real_escape_string($_GET["shtid"])."' AND myaction='shout-comment' ORDER BY byuid LIMIT 100"));
if($chorn[0]!=getuid_sid($sid))
{
$msg = "<a href="main.php?action=viewuser&who=$uid">".htm lspecialchars(getnick_uid("$uid"))."</a> Commented on ".htmlspecialchars(getnick_uid("$shti[0]"))." shout <a href="lists.php?action=moresht&shtid=".$shti[2]."#comnu">"".substr($shti[1],0,40).""</a>[br/]Auto Notification Msg";
autopm($msg, $chorn[0], 1);
}
Comment