Skip to Content.
Sympa Menu

freetds - [freetds] Re: Problem with return value from PHP's mssql_query() when calling a stored procedure that returns an empty result set

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Daniel Fazekas <fdsubs AT axelero.hu>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Re: Problem with return value from PHP's mssql_query() when calling a stored procedure that returns an empty result set
  • Date: Thu, 1 Apr 2004 02:32:42 +0200


On Apr 1, 2004, at 1:37, Michael Sims wrote:

While the change in behavior is certainly noteworthy, and hopefully the developers will have an idea, if I read your description right, it's not a serious problem and you shouldn't be too concerned.

All PHP *_query functions are supposed to have three possible results:

1. bool false if the query failed
2. bool true if the query succeeded and that's all the information there is (for example a successful UPDATE or DELETE)
3. a result resource

There are countless ways in PHP to differentiate the three from each other, the easiest are probably:

1. $result === false
2. $result === true
3. is_resource($result)

I have used both the sybase_ct and the mssql extensions with no real problems, they are definitely not known to be any less reliable than --with-sybase.

--with-mssql is the current recommendation as it ensures source compatibility with PHP on Windows, which of course might not be a concern to you.

Note that the current version of PHP is 4.3.5 and there were changes in the Sybase extension, though probably unrelated.

--
fds





Archive powered by MHonArc 2.6.24.

Top of Page