Hello,
For some reason, I always have problems with these WHILE statements. I am receiving a result that keep looping over and over again when it should just show what I want it to show. Here is my code:
$query = "SELECT * FROM contactmanager INNER JOIN casetransactions ON (contactmanager.username = casetransactions.author) INNER JOIN casesubmission ON (contactmanager.username = casesubmission.username) INNER JOIN casenotes ON (contactmanager.username = casenotes.username) WHERE contactmanager.username = '$username'";
$result = mysqli_query($dbc, $query);
while ($row = mysqli_fetch_array($result)) {
echo '<td>' . $row['contactdate'] . '</td>';
echo '<td>' . $row['fullname'] . '</td>';
echo '<td>' . $row['amountowed'] . '</td>';
echo '<td>' . $row['accountstatus'] . '</td>';
}
------------------------------------------------
I would like the statement to show all rows where the username equals the username.
I have 4 different tables I am pulling information from, but they all have the same username.
I had this problem before and cannot figure out what the issue is.
For some reason, I always have problems with these WHILE statements. I am receiving a result that keep looping over and over again when it should just show what I want it to show. Here is my code:
$query = "SELECT * FROM contactmanager INNER JOIN casetransactions ON (contactmanager.username = casetransactions.author) INNER JOIN casesubmission ON (contactmanager.username = casesubmission.username) INNER JOIN casenotes ON (contactmanager.username = casenotes.username) WHERE contactmanager.username = '$username'";
$result = mysqli_query($dbc, $query);
while ($row = mysqli_fetch_array($result)) {
echo '<td>' . $row['contactdate'] . '</td>';
echo '<td>' . $row['fullname'] . '</td>';
echo '<td>' . $row['amountowed'] . '</td>';
echo '<td>' . $row['accountstatus'] . '</td>';
}
------------------------------------------------
I would like the statement to show all rows where the username equals the username.
I have 4 different tables I am pulling information from, but they all have the same username.
I had this problem before and cannot figure out what the issue is.