Skip to Content.
Sympa Menu

freetds - [freetds] Empty string VS Space in select

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Cédric Dumetz <cedric.dumetz AT eolas.fr>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Empty string VS Space in select
  • Date: Tue, 21 Sep 2004 10:37:33 +0200

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 ?

$sql = "select UTI_NOM from UTILISATEUR ID_UTILISATEUR=10";
$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


Cédric





Archive powered by MHonArc 2.6.24.

Top of Page