Hi would appreciate some help here, basically I have 2 tables currently:

PHP Code:
message_status
+----+------------+---------+------------------------+
|  
id  |  contentID  |  status  |          lastUpdate          |
+----+------------+---------+------------------------+
|  
1  |         1       |      2     2012-06-19 20:21:16     |
+----+------------+---------+------------------------+

message_content
+------------+----------+------------------------+
|  
contentID  |  content  |          created              |
+------------+----------+------------------------+
|        
1       |  testing    |  2012-06-19 20:21:00   |
+------------+----------+------------------------+
|        
1       |  testing1  |  2012-06-19 20:21:16   |
+------------+----------+------------------------+
|        
1       |  testing2  |  2012-06-19 20:21:30   |
+------------+----------+------------------------+

SELECT FROM message_content mc
LEFT JOIN message_status ms ON
(ms.contentID mc.contentID)
WHERE mc.contentID "1" 
When the status is 2, I want to only retrieve contents not more than the "lastUpdate" datetime. Is it possible to do this in a query with IF statement? For example:

PHP Code:
SELECT FROM message_content mc
LEFT JOIN message_status ms ON
(ms.contentID mc.contentID)
WHERE mc.contentID "1" AND
IF(
ms.status 2mc.created <= ms.lastUpdate