php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9379 mssql_query can't get result
Submitted: 2001-02-21 13:45 UTC Modified: 2001-06-30 14:57 UTC
From: napoleon at autoid dot ee Assigned:
Status: Closed Package: MSSQL related
PHP Version: 4.0.3pl1 OS: Windows ME
Private report: No CVE-ID: None
 [2001-02-21 13:45 UTC] napoleon at autoid dot ee
mssql_query() can't fetch result from server if I use
sql server variables in query. 
For example this script:
<?php
mssql_connect([server],[user],[password])
$sql_result=mssql_query("declare @kala int;select @kala=5;delete from [table] where field1=@kala");

$sql_result2=mssql_query("select * from kasutajad");
?>

If I turned error severity to 0 I saw following 
error:MS SQL error: 
Attempt to initiate a new SQL Server operation with results pending. (severity 7) in c:\htdocs\sqltest.php on line 4

...but the first query has no result to fetch...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-30 14:57 UTC] fmk@php.net
This is not a bug in the extension. You are sending queries to the server that causes the server to report errors.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Jul 07 03:05:46 2022 UTC