steviez Posted January 29, 2008 Share Posted January 29, 2008 Hi, I am trying to get my site to show when someone has posted a comment, with the code i have done even if its been read it still shows new. Here is my code: <?php // Check For New Comments $query = "SELECT profilecomment_id FROM se_profilecomments WHERE read_status='0' AND profilecomment_user_id='" . $user->user_info[user_id] . "'"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); if($num_rows){ $smarty->assign("new_comments", "1"); } ?> and on my page i have: [code] {if $new_comments eq "1"} do this {/if} any ideas? [/code] Link to comment https://forums.phpfreaks.com/topic/88393-solved-help-with-code/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.