MarkBrown
V2EX  ›  问与答

请问php+mysql的搜索功能一般怎么做?

  •  
  •   MarkBrown · Oct 31, 2013 · 3638 views
    This topic created in 4601 days ago, the information mentioned may be changed or developed.
    需求是这样的:
    1.输入一个搜索字符串,字符串可以对多个字段进行匹配。
    2.搜索集中在一张表中,但是表里面很多字段都是存的id,id对应的名字在其他表里。
    3.输出所有匹配搜索字符串的记录。
    3 replies    1970-01-01 08:00:00 +08:00
    zencoding
        1
    zencoding  
       Oct 31, 2013
    最简单的 sql > like
    kstsca
        2
    kstsca  
       Oct 31, 2013
    分词。。附表
    Veelian
        3
    Veelian  
       Oct 31, 2013
    Sphinx
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   838 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 21:19 · PVG 05:19 · LAX 14:19 · JFK 17:19
    ♥ Do have faith in what you're doing.