i have this weird problem and i dont know how to make it work.
the problem appears after i consider the OR statement.without or statement the first part is working .
So idont how to use this statement in mysql.
i hope someone can help me.
Down is my script.
$po=$_POST['postid'];
$poster=$_POST['poster'];
$user=$_SESSION['user'];
$checkz=mysql_query("SELECT DISTINCT poster FROM postcomment WHERE ((postid='$po') and (poster !='$poster')) OR ((postid='$po') and (poster !='$user'))");
$countt=mysql_num_rows($checkz);
if($countt>0){
while($row=mysql_fetch_array($checkz)){
$postern=$row['poster'];
echo" $postern<br/>";
}
}
my problem is here
$checkz=mysql_query("SELECT DISTINCT poster FROM postcomment WHERE ((postid='$po') and (poster !='$poster')) OR ((postid='$po') and (poster !='$user'))");
i eve tried this but didn`t work either.
$checkz=mysql_query("SELECT DISTINCT poster FROM postcomment WHERE ((postid='$po') and ((poster !='$poster') or (poster !='$user')));