Jump to content

sorting and resorting


greybeard

Recommended Posts

I need to be able to click on the table header an sort ascend or desend, This is the way it works now, (I left off some of the table html)

any ideas?

 

$query_stuff_in_db = "SELECT * FROM new_stuff ORDER BY some_number1 ASC;";

 

 

<TH><b>Column 1</font></b></TH>

<TH><b>Column 2</font></b></TH>

<TH><b>Column 3</font></b></TH>

</TR>

 

<?php do { ?>

 

<td> <?php echo $row_stuff_in_db['some_number1'];></td>

<td><?php echo $row_stuff_in_db['some_number2'];></td>

<td><?php echo $row_stuff_in_db['some_number3'];></td>

 

</tr> <?php } while ($row_stuff_in_db = mysql_fetch_assoc($stuff_in_db)); ?>

Link to comment
https://forums.phpfreaks.com/topic/2774-sorting-and-resorting/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.