Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5961779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:00:49+00:00 2026-05-22T19:00:49+00:00

hello i am stuck with jquery tablesorter: http://tablesorter.com/docs/index.html#Examples and would be grateful if some

  • 0

hello
i am stuck with jquery tablesorter:
http://tablesorter.com/docs/index.html#Examples

and would be grateful if some jquery guru could check my code to see where i am going wrong. instead of displaying 10 records per page it is displaying all records and also when i try to sort it does nothing. in addition to that, there are no zebra stripes appearing. all libraies are loaded and there are no errors in firebug. many thanks for your help.

<?php
$q=$_GET["q"];

$con = mysql_connect('localhost', 'root', '');
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("sample", $con);

$sql="SELECT * FROM logger_log WHERE idusr_log = '".$q."' order by datein_log desc";

$result = mysql_query($sql);

echo "<table id=\"userlog\" class=\"tablesorter\">
<thead>
<tr>
<th align=\"left\">Ip Address</th>
<th align=\"left\">Date In</th>
<th align=\"left\">Date Out</th>
</tr>
</thead>";

while($row = mysql_fetch_array($result))
  {
  echo "<tbody>";
  echo "<tr>";
  echo "<td>" . $row['ip_log'] . "</td>";
  echo "<td>" . date('d/m/Y H:i:s',strtotime($row['datein_log'])) . "</td>";
  echo "<td>" . date('d/m/Y H:i:s',strtotime($row['dateout_log'])) . "</td>";
  echo "</tr>";
  echo"</tbody>";
  }
echo "</table>";


mysql_close($con);
?>
<div id="pager" class="pager">
    <form>
        <img src="css/blue/first.png" class="first"/>
        <img src="css/blue/prev.png" class="prev"/>
        <input type="text" class="pagedisplay"/>
        <img src="css/blue/next.png" class="next"/>
        <img src="css/blue/last.png" class="last"/>
        <select class="pagesize">
            <option selected="selected"  value="10">10</option>
            <option value="20">20</option>
            <option value="30">30</option>
            <option  value="40">40</option>
        </select>
    </form>
</div>
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="js/jquery.tablesorter.pager.js"></script>
<link href="css/blue/style.css" rel="stylesheet" type="text/css" />
        <script>
        $(document).ready(function()     
        {   
            $("#userlog")
            .tablesorter({widthFixed: true, widgets: ['zebra']})     
            .tablesorterPager({container: $("#pager")});     

        } );
        </script>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T19:00:50+00:00Added an answer on May 22, 2026 at 7:00 pm

    You need to remove the <tbody> fom your results loop and place it around your while loop.

    echo "<tbody>";
      while($row = mysql_fetch_array($result)) {  
        echo "<tr>";
          echo "<td>" . $row['ip_log'] . "</td>";
          echo "<td>" . date('d/m/Y H:i:s',strtotime($row['datein_log'])) . "</td>";
          echo "<td>" . date('d/m/Y H:i:s',strtotime($row['dateout_log'])) . "</td>";
        echo "</tr>";  
      }
      echo"</tbody>";
    echo "</table>";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am doing some self-learning about JQuery and stuck over a question: I am
Hello just looking for some help as I've gotten stuck I have two Strings:
Hello I have use DOMDocs in the past but I am stuck how to
I'm stuck with this pretty silly thing; I got a textfile like this; Hello::140.0::Bye
Ok well I need some help because I am plain stuck. I am trying
Hello i m new to android and working on Radio application i gt stuck
I am going through the android hello world tutorial, and have been stuck when
Probably a simple solution but I'm stuck and it's late... :) $j('#thisImage').html('<img src=image.jpg id=box
Hello is there any way to create something like diablo hp/mana orb? https://i.stack.imgur.com/LAsDB.jpg I
I am using jQuery UI dialog for modal popups. I have some iframes in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.