Okay, what I need to do is check two db tables, the first to check if the user is 'following' somebody, the second the see what updates the person the user is following has made.
Here is the code I currently have
<?php
$sql = "SELECT * FROM updates WHERE user = '".$userid."'";
//Select everything from the users field where the Username is the same as the Cookie Variable
$query = mysql_query($sql) or die(mysql_error());
while($row = mysql_fetch_assoc($query)) {
if($row['gender'] == "Male"){
echo $row['fullname']." ".$row['type']." ".$row['network']." on his profile";
}else{
echo $row['fullname']." ".$row['type']." ".$row['network']." on her profile";
}
}
?>
As you can see all this is doing is checking the Update table and sorting it if they are male/female
But this will pull everything from the update table, and I need it to ONLY pull it for the users he is following.
My following table consists of 4 fields
linkto
linkfrom
fullnameto
fullnamefrom
I just don't know how to work the statements.


Sign In
Create Account


Back to top









