Jump to content

Weird list sort issue


bladechob

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.