-2

This question is more of a brainstorming/optimization question. I am still new to website development and I am curious as to the most efficient way to do database querying.

There is a filter menu being displayed that users can select as filter parameters for there results. I want users to be able to change the parameters on the fly (which they can) and have it requery the database as such.

I can just resubmit the form everytime in GET and requery the database and display each time, but I was wondering if there is a more effective way to do this.

An example filter can be seen here: http://lolteamrecruiter.com/find/player.php

4

1 回答 1

0

作为您问题的答案,您需要查看 jQuery 或纯 JavaScript。使用 jQuery AJAX 并获取返回数据、解析它并显示您的结果比想太多让您回到 JavaScript 圈的任务要快。

最终结果是使用 AJAX 进行“即时”数据返回和“不重新加载”屏幕操作。

实际的数据库优化不是在查询端进行的,而是在数据库端进行的。

于 2013-11-01T21:46:04.437 回答