Skip to Content.
Sympa Menu

freetds - [freetds] Problems with IF in queries

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Guille -bisho- <bisho AT eurielec.etsit.upm.es>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Problems with IF in queries
  • Date: Mon, 19 Apr 2004 13:45:09 +0200

I have a problem with queries using IF's:

-------------
$rs=mssql_query('select 1',$connection);
var_dump($rs);

This prints:
resource(7) of type (sybase-ct result)

-------------
$rs=mssql_query('if (EXISTS (select 1)) select 2 else select 0',$connection);
var_dump($rs);

This prints:
bool(true)

The most strange thing is that it works with an older version of
Freetds.

In debian I have one machine with php-sybase and freetds0 (freetds 0.53-7)
and all this queries work well (They return a valid result resource and the
data can be retrieved).

The other, more updated, has libct1 (freetds 0.61-5) and returns a
boolean "true" if the query contains if's sentences.

The problem is that freetds0 is deprecated, and no more present in
debian.

Anybody has found this?

--
.,,, Guillermo PĂ©rez -=] 19/04/2004 [=-
_' .,,,, - bisho@ ( onirica.com | eurielec.etsit.upm.es )
(v)/ ,''
( \/ :: Say NO!!! to SW PATENTS ::
bisho! ``\\ :: EuropeSwPatentFree Demostration: ::
.........:: http://online-demo.org ::



  • [freetds] Problems with IF in queries, Guille -bisho-, 04/19/2004

Archive powered by MHonArc 2.6.24.

Top of Page