bladechob Posted October 28, 2007 Share Posted October 28, 2007 Hi, I've obviously broken something here! When the top bar is clicked to sort the list I get the bar repeating to match the number of items in the list i.e. if there are 500 entries in the list I get the bar repeated 500 times as in bar>entry1 bar>entry2 etc. Any ideas? <script src="sorttable.js"></script> <style type="text/css"> <!-- td,th {font: 11px; font-family: arial} /* End of style section. Generated by AceHTML at 08/03/2004 11:43:36 */ --> </style> <STYLE type=text/css>TABLE.sortable A.sortheader { DISPLAY: block; FONT-WEIGHT: bold; COLOR: #666666; BACKGROUND-COLOR: #eee; TEXT-DECORATION: none } TABLE.sortable SPAN.sortarrow { COLOR: black; TEXT-DECORATION: none } </style> <p class="inclusion"> <table width="90%" class="sortable "id="tsort"> <!-- <form action="abacus_main.php?hotelid=<? echo $hotelid?>" method="post"> <tr><td>Add an allocation called - <input type="text" name="alloname" size="40" maxlength="256"> <input type="submit" value="Add"></td></tr> </form> <b> Current allocations - for <? echo $hotel_name?>, <? echo $hotel_town?>, <? echo $hotel_add1?>.</b> <br><br> --> <? dbconnect(); $query = "select alloname, hotelid from abacus "; //echo $query; $result=mysql_query($query,$conn); while ($r= mysql_fetch_array($result)) { $queryh = "select name from venue_main where hotelid='$r[1]' "; $resulth=mysql_query($queryh,$conn); $hotelname=mysql_result($resulth,0,0); ?> <tr bgcolor=lightblue> <td width="48%"> </td> <td width="28%"> </td> </tr> <tr bgcolor=lightblue> <td><a href="javascript:Startab('abacus_main.php?hotelid=<? echo $r[1]?>&alloname=<? echo $r[0];?>')"><? echo $r[0];?></a></td> <td><? echo $hotelname?></td> <td><? if ($level>='5' || $_SESSION['username']=='Hannah Giles'){?> <a href="cimnetint.php?content=abacusall&delete=<? echo $r[1]?>&alloname=<? echo $r[0];?>" name="link2" id="link1" onmouseover="MM_openBrWindow('areyousure.php','delete','menubar=yes,scrollbars=yes,width=600,height=50')">Delete <? }?> </a></td> <td><? if ($level>='5' || $_SESSION['username']=='Emma Savory'){?> <a href="cimnetint.php?content=abacusall&delete=<? echo $r[1]?>&alloname=<? echo $r[0];?>" name="link2" id="link1" onmouseover="MM_openBrWindow('areyousure.php','delete','menubar=yes,scrollbars=yes,width=600,height=50')">Delete <? }?> </a></td> </tr> <? } Link to comment https://forums.phpfreaks.com/topic/75076-weird-list-sort-issue/ Share on other sites More sharing options...
GingerRobot Posted October 28, 2007 Share Posted October 28, 2007 I don't really undestand your description of the problem. Moreover, i can't actually see any sorting being done on the data. All i see is : <script src="sorttable.js"></script> Which isn't overly helpful. Is there some links generated by that? How is the sort performed - there are no ORDER BY clauses in your queries? Link to comment https://forums.phpfreaks.com/topic/75076-weird-list-sort-issue/#findComment-379704 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.