Page 1 of 1

Filtering the current artcile id

Posted: Fri Aug 31, 2007 12:17 am
by kkonline

Code: Select all

SELECT DISTINCT id FROM wow WHERE 0 OR CONCAT(title,content,views,'') LIKE '%".$pieces[$i]."%' ORDER BY id DESC
The query above works fine, but sometimes if the pieces matches with the current article, it returns the id of the article i am viewing.

How to filter the current id of the article from search results?

current id is accessed by $page;

Posted: Fri Aug 31, 2007 5:48 am
by VladSun
Use ID field and variable $page in your where clause