Canman2005 Posted July 23, 2008 Share Posted July 23, 2008 Hi all I have the following QUERY SELECT * FROM news WHERE title LIKE '%".$_GET['q']."%' OR content LIKE '%".$_GET['q']."%' AND pageid != 3496 How can I mod this QUERY so that if pageid does = 3496 then it just returns the last 10 rows for any rows containing 3496 but still keep it returning * Does that make sense? Any help would be ace Thanks Ed Quote Link to comment Share on other sites More sharing options...
paul2463 Posted July 23, 2008 Share Posted July 23, 2008 SELECT * FROM news WHERE title LIKE '%".$_GET['q']."%' OR content LIKE '%".$_GET['q']."%' AND pageid = 3496 ORDER BY pageid DESC LIMIT 10 Quote Link to comment Share on other sites More sharing options...
Canman2005 Posted July 23, 2008 Author Share Posted July 23, 2008 Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.