如何实现用php在站内关键字的搜索。例如搜索一个关键字可以从数据库中遍历很多有这个关键字的内容。
希望给提供 源代码。

解决方案 »

  1.   

    可以试试这个Google Powered Site Search With jQueryhttp://tutorialzine.com/2010/09/google-powered-site-search-ajax-jquery/
      

  2.   

    就基本的模糊查询吧。select * from tb_name where filed_name like '%关键字%';
      

  3.   

    站内搜索吗,可以用下sphinx + mysql,那个可以建立站内搜索,速度也很快。我试过,效果不错,可以看看这里
    http://blog.csdn.net/wuddny/archive/2011/06/14/6544550.aspx这个支持对中文分词支持也可以