Let's see if I can properly explain my issue...
I have a form that, based on the input, returns a list of apartments that fit the Rent range...
Also on this form there are features that the user can check that they would like to have in an apartment (A/C, Garage, etc...) ...
I have set up a series of includes that returns a $match_percent for each apartment in the list...
What I want to do is Order the table by the new $match_percent column...
Here is some of the code...
$apt_result = mysql_query("SELECT *
FROM apartments
Where AptID=$aptid_1
",$db);
if ($apt_myrow = mysql_fetch_array($apt_result))
{
// This is where $match_percent comes from
include("match_percent.php");
do
{
printf("
<tr>
<td>
%s
</td>
<td>
%s
</td>
<td>
%s
</td>
<td>
%s
</td>
<td>
<a href=\"show_id.php?id=" .$apt_myrow['AptID'] . "\">$match_percent</a>
</td>
</tr>",
$apt_myrow['AptAddress'],
$apt_myrow['AptApt'],
$apt_myrow['AptCity'],
$apt_myrow['AptAvailable']);
}
while ($apt_myrow = mysql_fetch_array($apt_result));