Quote:
|
How to sort lastest news .
|
Try adding an
ORDER BY statement and sort by either the datetime field or maybe id.
eg:
PHP Code:
$query = <<<EOQ
SELECT *
FROM news
WHERE ((publish = 'Y') AND
(title like '%keyword%' OR abstraksi like '%keyword%'))
ORDER BY datetime DESC
EOQ;
You can also limit the number of results by using the
LIMIT statement in your query.
-r