問題:
關于調用帶有關鍵字文章的問題。
例如:
{get sql="SELECT a.contentid,a.catid,a.title,a.thumb,b.Link,a.keywords,b.Keyword,b.from_url,b.Shop_Name,b.Shop_Address,b.Website,a.islink,b.From_Address,b.buy_url,b.Price1,a.description,a.updatetime,b.content,a.inputtime,a.url FROM `phpcms_content` a, `phpcms_c_news` b, `phpcms_content_tag` k WHERE a.contentid=b.contentid AND a.status=99 AND a.contentid=k.contentid AND k. `tag`='校花' AND a.`thumb`!='' AND `catid` IN(11,12,13,43,32,35,37,38,293) ORDER BY a.contentid DESC" rows="5"} |
這是文章關鍵字是“校花”的文章標題,如果我想顯示關鍵字是“校花”“帥哥”的文章,是不是就在`tag`='校花' 這里改成`tag`='校花,帥哥' ?經過測試,是不行的。不知道應該怎么改?
回答:
`tag`in ('校花','帥哥' )