I have this problem with my task system,
whenever a new member makes his first task, it doesn’t show up. Only the ones made after the first one.
<?php
$sql = mysql_query("SELECT * FROM todo WHERE member_id = '".$_SESSION['member_id']."' ORDER by id ASC");
if (!$sql) {
die ('invalid query: ' . mysql_error());
}
$rows = mysql_fetch_assoc($sql);
while($rows = mysql_fetch_array( $sql )) {
?>
After that I just echo out all of the content (tasks). each row under eachother. But the first task made just doesn’t show up. It remains hidden.
Does anyone know how to fix this?
this is too much. delete it. it fetches the first line, so the while loop can’t get the first line.
additionally, i wouldn’t use
mysql_fetch_arrayin the while, use mysql_fetch_assoc to use an associative array.