Skip to Content.
Sympa Menu

freetds - [freetds] PHP 4 + Freetds 0.60 + SQL Server 2000

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Cédric Dumetz <cedric.dumetz AT eolas.fr>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: [freetds] PHP 4 + Freetds 0.60 + SQL Server 2000
  • Date: Mon, 13 Sep 2004 16:54:47 +0200


Hello,

Since 2 years ago we use freetds 0.52 to connected between PHP and SQL
Server.

Due to problem with the euro character (€) we upgrade to Freetds 0.60.

But now we've got a big problem with the php function mssql_query or
mssql_fetch_array.

When my query return an empty result the link identifier return 1 instead of
a true link identifier (# XX)


Do I need to upgrade again or any other idea.

Thanks and excuse for my poor english

Cedric


**************
* in my code *
**************
echo 'first query';
$sql = "select COLONNE_1 from MY_TABLE where 1=1";
$rs = mssql_query($sql) or die($sql);
echo $rs. '<br>';
$row = mssql_fetch_array($rs);
echo row["COLONNE_1"] . '<br>'. '<br>';

echo 'second query';
$sql = "select * from MY_TABLE where 1=0";
$rs = mssql_query($sql) or die($sql);
echo $rs. '<br>';
$row = mssql_fetch_array($rs);
echo row["COLONNE_1"] . '<br>'. '<br>';

**************
* it's write *
**************
first query
Resource id #5
TOTO

second query
1
Warning: mssql_fetch_array(): supplied argument is not a valid Sybase result
resource in ......





Archive powered by MHonArc 2.6.24.

Top of Page