php 多个关键字智能查询解决方法
php 多个关键字智能查询
求助 需求如下
当我输入网站 就出现网站建设 网站制作 网站设计 等类似的多个关键词
当我选择四川(或者北京 上海等全国地名) 就出现成都网站建设 成都网站制作等多个地名
可以智能提示 比如四川网站建设哪家好 四川成都网站建设公司哪家最好等类似语句
寻求思路 谢谢
------解决方案--------------------
要做好一些數據關聯的表
例如四川可以關聯到成都的地區關聯。
------解决方案--------------------
你是想组词造句呢?还是想查询?
------解决方案--------------------
把那堆词句入库,后台弄个页面管理编辑呗 可以再加个分类哈
当前台输入文字(比如成都)时触发事件,ajax提交到后台,sql语句用 like '%成都%' 查出关联词句,打个json包输出给前台
如果要实现输入四川提示成都XXX这种,就多加个关联文字的字段,然后前台输入呗
比如我输入一个词 成都网站制作 另一个输入框可以输入 成都四川网建 等等扩展词 到时候一起查 2个like用或连起来就欧了
------解决方案--------------------
做什么用?是写文章还是当枪手?
------解决方案--------------------
你的句子不是有那六种词组成的吗?
分别把他们放到数组里,并补一个空元素
在 6 层嵌套循环里转就是了
唯一的约束条件就是 简单核心词 和 复杂核心词 不能同时为空
------解决方案--------------------
成都哪家网站制作公司收费最便宜
成都哪家网站制作公司制作的网站最好 比如说这样的 成都地名可以变 网站制作也可以变 后面那句公司收费最便宜 和公司制作的网站最好 你是说把他们入库 然后地方 和公司制作这样的在分别入库 然后用ajax提交 在连接出来 这样做么?
仔细看了下3楼后的回帖,发现我原来的理解可能错了,无视吧...
没有看明白你的需求,

------解决方案--------------------
换个浏览器,
------解决方案--------------------
嵌套太多了。
------解决方案--------------------
coreseek+php

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

A string is a sequence of characters, including letters, numbers, and symbols. This tutorial will learn how to calculate the number of vowels in a given string in PHP using different methods. The vowels in English are a, e, i, o, u, and they can be uppercase or lowercase. What is a vowel? Vowels are alphabetic characters that represent a specific pronunciation. There are five vowels in English, including uppercase and lowercase: a, e, i, o, u Example 1 Input: String = "Tutorialspoint" Output: 6 explain The vowels in the string "Tutorialspoint" are u, o, i, a, o, i. There are 6 yuan in total

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

What are the magic methods of PHP? PHP's magic methods include: 1.\_\_construct, used to initialize objects; 2.\_\_destruct, used to clean up resources; 3.\_\_call, handle non-existent method calls; 4.\_\_get, implement dynamic attribute access; 5.\_\_set, implement dynamic attribute settings. These methods are automatically called in certain situations, improving code flexibility and efficiency.

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.
