想要实现这样的读取数据库的功能,如何做
本帖最后由 bnhxy 于 2014-01-07 20:49:05 编辑 比如说我有两个表
表game有列gameid,gamename
里面有数据
1. gameid=1, gamename=a
2. gameid=2, gamename=b
3. gameid=3, gamename=c
表news里有newsid,news_title,gameid
里面有数据
1. newsid=1, news_title=abc, gameid=1
2. newsid=2, news_title=def, gameid=1|2
3. newsid=3, news_title=ghi, gameid=1|2|3
最后想输出所有关于gamename=b的news_title
除了用like,还有什么别的好方法可以输出,或是要如何建表能实现相应的效果?
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn