PHP mssql选择blob字段错误? 插入blob字段

I have a php script wich selects data from ms sql database. the following error apears.

"PHP Warning:
  mssql_query():
  Query failed in /var/www/integration/sqlview.php on line 59,
  referer: http://*****/integration/
"

Upon investigating I found that the one field is a blob field, and when i take it out of my php select statement the query works, but when i add it it fails. But there is nothing wrong with the select statement as it works 100 persent in sql browser.

$host = '****\sagex3';
$port = '**';
$server = $host;
$database = '***';
$user = 'sa';
$password = '****';


$link = mssql_connect ($server, $user, $password);
if (!$link)
{
die('ERROR: Could not connect: ' . mssql_get_last_message());
}

mssql_select_db($database);

$query = "
SELECT 
MSGID_0,
PARENTID_0,
MSGTYPE_0,
MSGSTATUS_0,
POLLMETHOD_0,
CLIENTNAME_0,
USERID_0,
CPY_0,
FCY_0,
PARAM1_0,
PARAM3_0,
POPULATEDDAT_0,
POPULATEDTIM_0,
STARTDAT_0,
STARTTIM_0,
ENDDAT_0,
ENDTIM_0,
RETRYONERROR_0,
RETRIES_0,
POLLERID_0,
ERRORMSG_0,
ERRORDETAIL_0 ---  when i remove this field the query works. this seems to be a blob field?
FROM PILOT.Y9CONTROL
 ";
//this is line 59
$result = mssql_query($query);
if (!$result) 
{
    $message = 'ERROR: ' . mssql_get_last_message();
    return $message;
}
else
{
    $i = 0;
    echo '<html><body><table><tr>';
    while ($i < mssql_num_fields($result))
    {
        $meta = mssql_fetch_field($result, $i);
        echo '<td>' . $meta->name . '</td>';
        $i = $i + 1;
    }
    echo '</tr>';

    while ( ($row = mssql_fetch_row($result))) 
    {
        $count = count($row);
        $y = 0;
        echo '<tr>';
        while ($y < $count)
        {
            $c_row = current($row);
            echo '<td>' . $c_row . '</td>';
            next($row);
            $y = $y + 1;
        }
        echo '</tr>';
    }
    mssql_free_result($result);

    echo '</table></body></html>';
}

 echo "done";

?>

It seems that the ERRORDETAIL_0 is a blob field causing problems. Ho do i get around this

Ok I found the answer. utf8 on php.ini.

Once I changed that it works 100%.

Thanks all