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' ORDER BY post_date desc,category_id LIMIT :limit OFFSET :offset
array(1) {
[0]=>
string(25) "msg.`category_id`= '301' "
}