Well as you pointed out (probably without realising it), the array values are not stored in the variable and instead the actual name/code of the array is stored in the variable of your first code box. So try making the sql variable the following:

$sql='SELECT * FROM TABLE WHERE TM_ID > 2000 AND TM_ID='.$row_tMain[TM_ID].' AND TM_DATE='.$row_tMain[TM_DATE];
//or the following two lines:
$filterString='AND TM_ID='.$row_tMain[TM_ID].' AND TM_DATE='.$row_tMain[TM_DATE];
$sql="SELECT * FROM TABLE WHERE TM_ID > 2000 ".$filterString;

Well as you pointed out (probably without realising it), the array values are not stored in the variable and instead the actual name/code of the array is stored in the variable of your first code box. So try making the sql variable the following:

$sql='SELECT * FROM TABLE WHERE TM_ID > 2000 AND TM_ID='.$row_tMain[TM_ID].' AND TM_DATE='.$row_tMain[TM_DATE];
//or the following two lines:
$filterString='AND TM_ID='.$row_tMain[TM_ID].' AND TM_DATE='.$row_tMain[TM_DATE];
$sql="SELECT * FROM TABLE WHERE TM_ID > 2000 ".$filterString;

Thanks for reply,

Here my concern is the $filterString comes from a function in which i have to do some juggling of the string and this resultant string is used in many places. I can not put row_tMain value statically.

I need to add row_tMain 's value dynamically as per my query thats why I was trying with eval.