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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:04:37+00:00 2026-06-17T05:04:37+00:00

I am sorry, this might be a very basic question, but I teach myself

  • 0

I am sorry, this might be a very basic question, but I teach myself from the web, and dont know who else to ask.

I want to know if there is a way to execute a php/mysql query to a remote server and then return the result to the client machine. I plan to use the result of the query (2D) to be accessed by the user and another queries to be executed. It has to be accessed by the javascript script with ajax call or in a better way

I want to do this cos I want to “speed up” the site, and limit the time the user looses while the query is executed.

Example: The user wants to see some data for a all employees of a company X. Php selects all employees of company X and “sends back” the result to the machine, where it is stored. Later the user can filter only employees who are male, or have a car, or a male and have a car

EDIT:
As I get it, this will show the whole query as a table on the page, and them will filter based on user input.

I use a similar solution, showing the table columns I need to show and adding the other as custom div values inside the div that presents the data.

<div class="card selected" id="26912" name="Afflicted Deserter" cost="3R" dualface="Werewolf Ransacker" exp="DKA" type="Creature - Human Werewolf">Afflicted Deserter || Werewolf Ransacker</div>

I use onclick event to select the div and store div values as variables.

  SelectCard = function  (card) {
    $('body').data({"currentID":$(card).attr('id'), "currentNAME":$(card).attr('name'), "currentCOST":$(card).attr('cost'), "currentTYPE":$(card).attr('type'), "currentEXP":$(card).attr('exp')})
    $('#cardIMG').attr('src',"mtg-img/" + $(card).attr('exp') + "/" + $(card).attr('name') + ".full.jpg");
  }

I apply hidden to all entries I dont want to use. I also use code select next/previous div on arrow up/down.

MoveArrows = function  () {

$(document).keydown(function(e){

      if (e.keyCode == 40) { 
        if(chosen === "") {
            chosen = 0;
        } else if((chosen+1) < $('div.card').length) {
          // testvalue = $('div.card').next(".hidden").index();
          // console.log("testvalue:", testvalue)
            chosen++; 
        }
        $('div.card').removeClass('selected');
        while ($('#' + parentDiv).find('div.card').eq(chosen).hasClass('hidden')){
          chosen++;
        }
        $('#' + parentDiv).find('div.card').eq(chosen).addClass('selected');
        SelectCard( $('#' + parentDiv).find('div.card').eq(chosen))
        return false;
    }
    if (e.keyCode == 38) { 
        if(chosen === "") {
            chosen = 0;
        } else if(chosen > 0) {
            chosen--;            
        }
        $('div.card').removeClass('selected');
        while ($('#' + parentDiv).find('div.card').eq(chosen).hasClass('hidden')){
          chosen--;
        }
        $('#' + parentDiv).find('div.card').eq(chosen).addClass('selected');
        SelectCard( $('#' + parentDiv).find('div.card').eq(chosen))
        return false;
    }
})
}

While cycle is executed to find the next non-hidden div.

My problem is, that when there are too many entries, up/down clicks takes a while to select next div.

How does datatables handle filtered results?

  • 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-17T05:04:38+00:00Added an answer on June 17, 2026 at 5:04 am

    An option for client side processing in javascript is the excellent datatables jQuery plugin. This would achieve your goal of removing additional server calls to sort or filter the original query.

    If you want the data to persist between sessions, you may want to consider HTML5 Web Storage

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

Sidebar

Related Questions

Sorry this might be a very stupid question. But I did have bug with
This might be very basic question to some but I am struggling for quite
Very sorry for the basic question but I've seen this implemented in so many
Sorry for english this might be very basic Question, I have an Application where
Sorry, this might be a basic/stupid/noob question - I am just trying to tweak
Sorry this is a basic question, but all my research just barely missed answering
I might be asking a very basic question and I am sorry for that.
Sorry this might be a simple question, but I could not figure it out.
I am sorry about how simple this question might be, but I cannot find
First of all, sorry if this might be a stupid question. I'm very new

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.