SELECT msg.sid, msg.category_id , msg.for_degree, msg.resource_type, msg.subject, msg.hits, msg.post_date, msg.tags, cat.category, cat.subcategory
FROM msgboard msg LEFT JOIN categories cat ON msg.category_id=cat.sid WHERE msg.`category_id`= '301' AND CONVERT(msg.`for_degree`,char) LIKE '%5%' ORDER BY post_date desc,category_id LIMIT :limit OFFSET :offset
array(2) {
[0]=>
string(25) "msg.`category_id`= '301' "
[1]=>
string(42) "CONVERT(msg.`for_degree`,char) LIKE '%5%' "
}