0

I get

Notice: Undefined index: replies.reply_date in C:\xampp\htdocs\proiect\topic.php on line 25

error and I do not know why. Here is my code. I get it also for users.username and for replies.reply_content. Here is the sql query

$sql = "SELECT replies.reply_topic, replies.reply_content, replies.reply_date, replies.reply_by, users.user_id, users.username
                FROM replies LEFT JOIN users ON replies.reply_by = users.user_id
                WHERE replies.reply_topic = " . mysql_real_escape_string($_GET['id']);
        $result = mysql_query($sql);

And here is the while loop

while($row = mysql_fetch_assoc($result)){
                echo '<tr>';
                    echo '<td>';
                        echo $row['users.username'].'</br>'.$row['replies.reply_date'];
                    echo '</td>';
                    echo '<td>';
                        echo $row['replies.reply_content'];
                    echo '</td>';
                echo '</tr>';
            }
            echo '</table>';
        }
Ileana Profeanu
  • 377
  • 2
  • 10
  • 33

0 Answers0