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 8375817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:16:27+00:00 2026-06-09T15:16:27+00:00

I have a search form which pulls out various rows from a DB which

  • 0

I have a search form which pulls out various rows from a DB which are then displayed in a table. The code for pulling the rows is working fine. I am using datatables to display in a user-friendly way. The datatables code is working as I can see the search controls etc and the next-previous buttons once the table is filled however the table doesnt appear to be completing pagination on initial load.

There is no “Showing ** to ** of ** entries” text and all rows returned are displayed however once I click the next button or use the display only 10/25/50/100 dropdown pagination kicks in and pagination works perfectly from thereforth. I’m pulling my hair out because this was working for me yesterday and I cant think of what I have changed since to stop it working:

I intialize datatables below

$(document).ready(function() {
    $('#blog-search').dataTable( {
        "aaSorting": [[ 4, "DESC" ]],
        "aoColumnDefs": [
          { "sType": "numeric-comma", "aTargets": [ 2 ] }

        ],
        "bPaginate": true,

    } );
} );

the sorting of the columns also

  • 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-06-09T15:16:28+00:00Added an answer on June 9, 2026 at 3:16 pm

    When I add your code into a jsfiddle I recieved the following error message in the console:

    Uncaught TypeError: Property 'string-DESC' of object #<Object> is not a function

    On further investigation it appears that the "aaSorting": [[ 4, "DESC" ]], line in your code is the problem. The sort string needs to be in all lower case, I.E. "desc" NOT "DESC".

    The working code should be as follows:

    $(document).ready(function() {
        $('#blog-search').dataTable( {
            "aaSorting": [[ 4, "desc" ]],
            "aoColumnDefs": [
              { "sType": "numeric-comma", "aTargets": [ 2 ] }
    
            ],
            "bPaginate": true,
    
        } );
    } );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On my page I have a search form which generates a table for the
what I have: a google search form (displayed on all pages) a wordpress page
I have a search form that can search in different provider. I started out
I have a search form through which users can, well, perform searches. When the
I have a search form with filters. 1 filter is range which is to
So, I have a search form in my website which posts Search.Value as a
I have a search form regarding property search having some elements on which search
i have a search form page, which takes me to reslutant page and show
I have the following jquery Autocomplete form that pulls data in from a local
I have a search form on which I have the following INPUT field <input

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.