[freetds] Empty string VS Space in select

Cédric Dumetz cedric.dumetz at eolas.fr
Tue Sep 21 04:37:33 EDT 2004

I'm on PHP 4.3.8 + FreeTDS 0.61 (protocol 7.0) + MSSQL 2000

I already wrote about problem when inserting empty String in my database.

I fact the true problem is during the select command (in my database the
value is really empty).
If the value of a column is empty, then returned result is ' '

Any Idea ?

$rs = mssql_query($sql);
$row = @mssql_fetch_array($rs);
echo $row["UTI_NOM"]; //write ' '

NB : please to note that I must use @ because if I have not result $rs is a
true boolean instead of a ressource identifier


More information about the FreeTDS mailing list