Jump to content

[SOLVED] if statement in QUERY


Canman2005

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/116172-solved-if-statement-in-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.