如何在网站上创建过滤器 [英] how to create filters in a web site

查看:158
本文介绍了如何在网站上创建过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建像snapdeal,jabong等网站使用PHP MySQL的,他们使用的过滤器侧边栏没化妆窄的搜索在这个链接,<给定href="http://www.snapdeal.com/products/computers-printers-scanners/?q=Type_s%3ALaser%20Printers&FID=checkbox_Type_s%20%3A%20Laser%20Printers#plrty|Type_s:All%20in%20One%20Printers|Brand:HP|Price:2836,16755|Functions_s:Copy" rel="nofollow">http://www.snapdeal.com/products/computers-printers-scanners/?q=Type_s%3ALaser%20Printers&FID=checkbox_Type_s%20%3A%20Laser%20Printers#plrty|Type_s:All%20in%20One%20Printers|Brand:HP|Price:2836,16755|Functions_s:Copy^打印|

I am creating a website like snapdeal, jabong etc using php mysql where they uses sidebar filters no make narrow search as given in this link ""http://www.snapdeal.com/products/computers-printers-scanners/?q=Type_s%3ALaser%20Printers&FID=checkbox_Type_s%20%3A%20Laser%20Printers#plrty|Type_s:All%20in%20One%20Printers|Brand:HP|Price:2836,16755|Functions_s:Copy^ Print|""

同样是这样我想创建搜索引擎为我的网站和侧边栏过滤器使用PHP和MySQL狭窄的搜索结果。但问题是我不知道如何来创建这些过滤器侧边栏,什么逻辑应该用于PHP的MySQL ....

similarly like this i want to create search engine for my website and sidebar filters for narrow search results using php and mysql . But the problem is i dont know how to create those sidebar filters and what logic should be used for creating them in php mysql ....

我已到处搜寻,但力得到逻辑这一点。任何人都可以提供一些参考code或链接在那里我可以学到如何$ C $下创建的PHP和MySQL的过滤器。如果他们的一些code可谁能送我的链接感谢名单。

I have searched everywhere but dint get the logic for this . can anyone give some reference code or link where i can learn how to code for creating filters in php and mysql . If their is some code available can anyone send me the link thanx .

推荐答案

基本上在一个网站过滤列表,因此,你需要关注的列或字段名传递到你的服务器端应用程序,并相应地改变你的数据库查询(使用WHERE子句),然后返回结果给客户端,并重绘列表。这将是你所需要的逻辑。

Basically to filter out a list result in a website you need to pass the column or field name of interest to your server side application and change your database query accordingly (using where clause) then return back the result to client and redraw the list. This would be the logic you need.

这篇关于如何在网站上创建过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆