Bug #10980 Updated: mssql query error
| From: | njgreen at jlonline dot com | Date: | Tue, 22 May 2001 09:36:19 +0000 |
| Subject: | Bug #10980 Updated: mssql query error | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-56215@lists.php.net to get a copy of this message | ||
ID: 10980
User Update by: njgreen@jlonline.com
Status: Open
Bug Type: ODBC related
Operating system: windows2000/98
PHP Version: 4.0.4pl1
Description: mssql query error
hi,
Thank you for helping.
I'm sorry,The 'result' is output of 'odbc_num_rows() '.
I expect get the record from 'bt_article',what
bt_article.id equal a value;
My bt_article struct :
id int(4) in
title char(40)
Previous Comments:
---------------------------------------------------------------------------
[2001-05-22 05:28:48] fmk@php.net
ODBC related should not be reported as MSSQL related.
Furthermore I think we need some more information about this error.
Are you getting other results than expected ? What is 'result' ? You dont have any
variables in the code with that name.
If 'result' is the output from odbc_num_rows() we need to know the structure of the table
and what you expect from your data.
---------------------------------------------------------------------------
[2001-05-21 02:57:59] njgreen@jlonline.com
//error source
$connid=odbc_connect('odbc_db','odbc_user','odbc_pswd');
$sql='select id from bt_article where id<>978';
$row=odbc_do($connid,$sql);
echo odbc_num_rows($row);
//result -1
//if $sql='select title from bt_article where id<>978 order by id';
//result is ok
//if $sql='select title from bt_article where id=978 order by id';
//result -1
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=10980