Just change the line in the php file that says
Code:
$query="SELECT * FROM `chatstorage` ORDER BY `date` DESC ";
To one of the following and save as a new name like storechatdate.php, storechatname.php, etc...
date,name,authid,ip,chattype or text
and look at this line to see how to make links by header row
Code:
<th align="center"><font face="Arial, Helvetica, sans-serif"><a href="storechatdate.php"> Date </font></th>