Skip to Content.
Sympa Menu

freetds - [freetds] Empty string in insert query

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 in insert query
  • Date: Tue, 14 Sep 2004 10:27:00 +0200

Hello,

I'm on PHP 4.3.8 + FreeTDS 0.61 + MSSQL 2000

I'm trying to execute a simple query with empty value like this :
$sql = "INSERT INTO MY_TABLE (COL1, COL2) VALUES ('TOTO', '')";
mssql_query($sql) or die($sql)

Unfortunatly, when query is executing, it will insert the value ' ' for COL2.

I saw there was a thread in the forum for a similar problem but it concerns
stored procedure and NULL value.

Once again when I used an old version of freeTDS, I didn't have this problem


CREATE TABLE [MY_TABLE] (
[COL1] [varchar] (50) NULL ,
[COL2] [varchar] (50) NULL
)




Archive powered by MHonArc 2.6.24.

Top of Page