Ok so maybe I am just blanking out here but I am making a notification system and I am using PHP as my backend. I am using the following code to set up the correct number of notifications
$updates = mysql_query("SELECT * FROM updates WHERE userid = '$uid'");
while($row = mysql_fetch_array( $query )) {
if ($updates>0) {
for ($i=0; $i<$updates;$i++) {
echo '
<li class="update">'.$updates.'</li>
';
}
} else {
echo'<h4 class="nonew">No New Notifications</h4>';
}
}
This code will echo the correct number of notifications but will echo the entire where it supposed to echo that single comments content. How do I echo only the contents of that single notification? I am sure this has a simple answer and I already know it but I just can’t think of it right now. Thanks!
EDIT:
Heres my database structure:
Updates
-id
-userid
-active
-date
-content
1 Answer