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

Daniel Fazekas fdsubs at axelero.hu
Wed Mar 31 19:32:42 EST 2004


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




More information about the FreeTDS mailing list