#30807 [Opn]: Sorry, bad topic name
| From: | shagren at ua dot fm | Date: | Tue, 16 Nov 2004 15:58:36 +0000 |
| Subject: | #30807 [Opn]: Sorry, bad topic name | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-69144@lists.php.net to get a copy of this message | ||
ID: 30807
User updated by: shagren at ua dot fm
-Summary: odbc_free_result cause warning when work with 2
connection
Reported By: shagren at ua dot fm
Status: Open
Bug Type: MSSQL related
Operating System: Debian GNU Linux
PHP Version: 4.3.9
New Comment:
Must be: mssql_query() return true on empty dataset
Previous Comments:
------------------------------------------------------------------------
[2004-11-16 16:53:47] shagren at ua dot fm
Description:
------------
When i run query that return "no records" mssql_query return not
"positive MS SQL result identifier". It return true.
I try this on Debian(current sarge version) with all package with
standard packagers version.
package: php4_4.3.9-1
Some info:
'../configure' '--prefix=/usr' '--with-apxs=/usr/bin/apxs'
'--with-regex=php' '--with-config-file-path=/etc/php4/apache'
'--disable-rpath' '--enable-memory-limit' '--disable-debug'
'--with-layout=GNU' '--with-pear=/usr/share/php' '--enable-calendar'
'--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg'
'--enable-track-vars' '--enable-trans-sid' '--enable-bcmath'
'--with-bz2' '--enable-ctype' '--with-db4' '--with-iconv'
'--enable-exif' '--enable-filepro' '--enable-ftp'
'--with-gettext'
'--enable-mbstring' '--with-pcre-regex=/usr' '--enable-shmop'
'--enable-sockets' '--enable-wddx' '--disable-xml'
'--with-expat-dir=/usr' '--with-xmlrpc' '--enable-yp'
'--with-zlib'
'--without-pgsql' '--with-kerberos=/usr' '--with-openssl=/usr'
'--enable-dbx' '--with-mime-magic=/usr/share/misc/file/magic.mime'
'--with-exec-dir=/usr/lib/php4/libexec' '--disable-static'
'--with-curl=shared,/usr' '--with-dom=shared,/usr'
'--with-dom-xslt=shared,/usr' '--with-dom-exslt=shared,/usr'
'--with-zlib-dir=/usr' '--with-gd=shared,/usr'
'--enable-gd-native-ttf'
'--with-jpeg-dir=shared,/usr' '--with-xpm-dir=shared,/usr/X11R6'
'--with-png-dir=shared,/usr' '--with-freetype-dir=shared,/usr'
'--with-imap=shared,/usr' '--with-imap-ssl' '--with-ldap=shared,/usr'
'--with-mcal=shared,/usr' '--with-mhash=shared,/usr' '--without-mm'
'--with-mysql=shared,/usr' '--with-unixODBC=shared,/usr'
'--with-recode=shared,/usr' '--enable-xslt=shared'
'--with-xslt-sablot=shared,/usr' '--with-snmp=shared,/usr'
'--with-sybase-ct=shared,/usr' '--with-ttf=shared,/usr'
'--with-t1lib=shared,/usr'
freetds version 0.61
This bug like as http://bugs.php.net/bug.php?id=24720
Reproduce code:
---------------
<?php
$dbh=mssql_pconnect('mssqlserver.com', 'user', 'password');
echo "connect :" . mssql_get_last_message ()."\n";
mssql_select_db("shagren_temp", $dbh);
echo "select_db :" . mssql_get_last_message ()."\n";
$sth=mssql_query("select * from big where 1=2", $dbh);
echo "select :" . mssql_get_last_message ()."\n";
var_dump($sth);
$data=mssql_fetch_row($sth);
echo "fetch :" . mssql_get_last_message ()."\n";
?>
Expected result:
----------------
connect :Changed database context to 'master'.
select_db :Changed database context to 'shagren_temp'.
select :Changed database context to 'shagren_temp'.
<Some MSSQL ID>
fetch :Changed database context to 'shagren_temp'.
Actual result:
--------------
connect :Changed database context to 'master'.
select_db :Changed database context to 'shagren_temp'.
select :Changed database context to 'shagren_temp'.
bool(true)
Warning: mssql_fetch_row(): supplied argument is not a valid Sybase
result resource in /root/tmp/mssql.php on line 9
fetch :Changed database context to 'shagren_temp'.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30807&edit=1