【发布时间】:2009-08-31 10:40:48
【问题描述】:
我有三个信息表,其中 business_id 是公共线程。我有两个输入字段,一个用于一般搜索(用户可以搜索他们想要的任何内容)和一个 zip 输入。在 php 方面,我捕获了一般搜索字符串并将其设置为 $search 并将 zip 设置为 $zip。
如何使用$search 变量来MATCH 任何全文索引然后 使用$zip 限制这些匹配项那么只返回表c中的id?
我的数据库结构如下:
table coup
id << this is the my desired information from the search
timestamp
business_id
coupvalue
startdate
enddate
username
status
terms
image
description
primary = id
fulltext = name
table bloc
id
address
city
state
zip
business_id
phone
lat
lon
primary = id
table bus
business_id
name
timestamp
category
subcat
primary = business_id
fulltext = name,category,subcat
任何帮助将不胜感激!
【问题讨论】: