Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You are overriding your variables in your while loop, so only the last value will be stored in your variables.</p> <p>Try this:</p> <pre><code>$query2="SELECT * FROM field_activity WHERE field_id='$fetch'"; $result2 = mysql_query($query2); while($row = mysql_fetch_array($result2)){ $activity = $row['activity']; $cr_date = date_create($row['date']); $for_date = date_format($cr_date, 'F j, Y'); $amount = $row['amount']; $acres_complete = $row['acres_complete']; $duration = $row['duration']; $status = $row['status']; echo "&lt;tr&gt;"; echo "&lt;td width='16%'&gt;&lt;strong&gt;Date&lt;/strong&gt;&lt;/td&gt;"; echo "&lt;td width='16%'&gt;$for_date&lt;/td&gt;"; echo "&lt;/tr&gt;&lt;tr&gt;"; echo "&lt;td width='16%'&gt;&lt;strong&gt;Activity&lt;/strong&gt;&lt;/td&gt;"; echo "&lt;td width='16%'&gt;$activity&lt;/td&gt;"; echo "&lt;/tr&gt;&lt;tr&gt;"; echo "&lt;td width='16%'&gt;&lt;strong&gt;Amount&lt;/strong&gt;&lt;/td&gt;"; echo "&lt;td width='16%'&gt;$amount&lt;/td&gt;"; echo "&lt;/tr&gt;&lt;tr&gt;"; echo "&lt;td width='16%'&gt;&lt;strong&gt;Acres Complete&lt;/strong&gt;&lt;/td&gt;"; echo "&lt;td width='16%'&gt;$acres_complete&lt;/td&gt;"; echo "&lt;/tr&gt;&lt;tr&gt;"; echo "&lt;td width='16%'&gt;&lt;strong&gt;Duration&lt;/strong&gt;&lt;/td&gt;"; echo "&lt;td width='16%'&gt;$duration&lt;/td&gt;"; echo "&lt;/tr&gt;&lt;tr&gt;"; echo "&lt;td width='16%'&gt;&lt;strong&gt;Status&lt;/strong&gt;&lt;/td&gt;"; echo "&lt;td width='16%'&gt;$status&lt;/td&gt;"; echo "&lt;/tr&gt;"; } </code></pre> <p>Additionally, this is not very good code. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload