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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:06:04+00:00 2026-06-01T19:06:04+00:00

I have this search script on my page which search through the displayed table.

  • 0

I have this search script on my page which search through the displayed table. The table is displayed with PHP from a database. It is actually a list, and this list is sorted out alphabetically with the help of hyperlinks of A to Z. Now I need to search the whole database instead of displayed ones. Any helps or resources would be helpful. 🙂

$(document).ready(function() {

    $("#search").keyup(function() {

        if($(this).val() != "") {

            $("#some_table tbody>tr").hide();
            $("#some_table td:contains-ci('" + $(this).val() + "')").parent("tr").show();
        } else {
            $("#some_table tbody>tr").show();
        }
    });
});

$.extend($.expr[":"], {
    "contains-ci" : function(elem, i, match, array) {
        return (elem.textContent || elem.innerText || $(elem).text() || "").toLowerCase().indexOf((match[3] || "").toLowerCase()) >= 0;
    }
});
  • 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-01T19:06:07+00:00Added an answer on June 1, 2026 at 7:06 pm

    Perhaps return the results from the server as a json object.

    http://your.hostname/database.json returns [{id:1,name:'joe'},{id:2,name:'bob'},...].

    Then, dynamically create the displayed table.

    function refreshTable() {
        $.ajax({
            url:'http://your.hostname/database.json',
            dataType:'json'
        }).done(function(json) {
            $('#my_table tbody tr').remove();
            for (i in json) {
                $('#my_table tbody').append($('<tr><td>'+json[i]['id']+'</td><td>'+json[i]['name']+'</td></tr>'));
            }
        });
    }
    

    Call refreshTable when the page is initially loaded, and maybe on certain intervals, or when the user presses a “refresh” button or something.

    glhf!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this MySQL statement from a search page, the user enters there postcode
i have this code to get the search resutls from the api: querygoogle.php: <?php
I have a Greasemonkey script which operates on a search results page at a
Scenario: I have a php page in which I call a python script. Python
I have a PHP scraper script which I use to scrape a page on
I have been writting a keyword search script based on this tutorial: http://www.hackosis.com/2007/11/06/howto-simple-search-engine-with-php-and-mysql/ Like
I have a simple script that does some search and replace. This is basically
I have a php page which shows an entire time schedule for a user
i have a page, which has 2 links (search, normal button), both redirects are
I have a VF page which has 2 date fields and search button. On

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.