Heya, Ajm113.
I want to display a row with a value of 1 up top I guest...
Alrightey. Probably the easiest way to do it is to create a variable to hold the top row. While you're fetching your MySQL results, check for the value that you want. If it matches, set the top variable to that row. Otherwise, add the row to your array as normal.
Once you're done loading results, check for the top variable and output it.
Expressed as code:
-
$data = array();
-
while($row = mysql_fetch_assoc($result)) {
-
if($row['desiredField'] === 'desiredValue')
-
$top = $row;
-
else
-
$data[] = $row;
-
}
-
-
if(isset($top))
-
// Display the top row.
-
-
// Display the other rows.
-
If you want the top row to be featured, but still appear in the rest of the table, just remove the else.