我試圖獲取相關文章的列表。示例查找與MySQL LIKE語句相關的文章
$title = $fetch_content[article_name]; // example out put "Hello World, Ask A Question"
$rel_title = "Select * from tbl_content WHERE status='t' and article_name like '%$title' order by id desc limit 5";
如何將「Hello World,Ask A Question」分隔爲單個關鍵字。
小問題:你應該引用數組鍵索引:'$ fetch_content ['article_name']'。不這樣做會使它認爲它是一個常數。 – nickf 2009-08-12 12:11:47