something wrong with sc_sql_injection macro

Hi,

I’m using blank application, in this i wrote code as below
let tag_id be T

if(isset($_REQUEST[‘tag_id’]))
{
$tag_id = sc_sql_injection($_REQUEST[‘tag_id’]);
if($tag_id == ‘T’)
{
sc_lookup(tagname,“SELECT tagname from tbl_tag where tag_id=$tag_id”);
}
elseif($tag_id=‘O’)
{
//some statements
}
else
{
//some statements
}
}
else
{
echo “Data not posted”;
}

when i run the code this if($tag_id == ‘T’) block is not executing though it is equal.

without sc_sql_injection it is executing correct.

what could be the problum.