$strSQL2 = "select [senddate],[message] from history
where service_id = '".$objResult['service_id']."' and DAY(senddate) = 7 and MONTH(senddate) = 11 and
YEAR(senddate) = 2011 and cat_type = '1' and service_id in (16,18,56,263,279,295,334,348,375,381,389,1006,1019,1076,1083,1093,1111,1120,1123,1124,1126,
1128,1129,1134,1143,1201,1202,1204,1205,1206,1207,1216,1227,1229,1244,1251,1261,1262,1263,
1293,1305,1326)
order by [senddate] desc";
$strSQL5 = "select [message],[rectime],[telno] from sms
where day_stamp = 7 and month_stamp = 11 and year_stamp = 2011 and telno = '021234567'
and [message] = '".trim($objResult2['message'])."' ";