1

我在 HTML 页面上有一个链接,它调用 perl 脚本。Perl 脚本将从 mysql 数据库中获取数据并显示在 HTML 页面上。

<a href = cgi-bin/customers.pl> show all customers </a>

HTML页面中有一些过滤器。

仅限 chennai 客户 - 当最终用户点击此内容时,只有 chennai 客户应显示

仅限孟买客户 - 当最终用户点击此内容时,只有孟买客户应显示

我是否需要为所有这些客户运行单独的 mysql 查询,或者我可以在客户端隐藏/再次显示它们?

4

1 回答 1

0

the question is to query all data and send to client or to query just the necessary and sent to client.

the answer depends on your data size. if your data set is small, i suggest to query all at once and hide and show at client.

if your data set is large, then just query the needed ones.

besides the current data set size, think about the growth rate. how fast and how big does your data grow. all those will change how you implement it.

于 2012-06-01T06:47:17.083 回答