|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-02-26 01:08 UTC] sniper@php.net
[2003-03-06 05:02 UTC] php at centaur dot mailshell dot com
[2003-03-06 05:34 UTC] magnus@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 20:00:01 2025 UTC |
Windows XP SP1 MSSQL 2000 Apache 2.0.44 PHP 4.3.1 Procedure definition: CREATE PROCEDURE foo @filter VARCHAR(255) AS SELECT id FROM bar WHERE baz LIKE @filter GO; Script: <?php $con = mssql_connect('localhost', $user, $password); mssql_select_db($dbname); $sp = mssql_init('foo'); mssql_bind($sp, '@filter', $filter, SQLVARCHAR); $result = mssql_execute($sp); print "[".$result."]\n"; // point A while ($row = mssql_fetch_object($result)) { // do something with $row }?> If there are no records in bar that satisfy $filter, [1] is printed at point A, and then mssql_fetch_object (and other functions that expect a resource ID, e.g. mssql_next_result) fails.