From: [EMAIL PROTECTED]
Operating system: Windows 2000 Server
PHP version: 4.3.0RC2
PHP Bug Type: MSSQL related
Bug description: update statement in mssql_query causes Access Violation
Since I upgraded from 4.23 to 4.3.0RC2 PHP is causing a lot of SQL-trouble.
We are using MS SQL-Server 2000/IIS/Win2000Server/PHP4.3.0-ORC2(isapi).
The trouble mainly is caused by using the UPDATE statement. Example:
$statement = "
UPDATE table1
SET name1 = 'anything'
WHERE name1 = 'something'
";
mssql_query($statement,$dbh);
Returns 'PHP has encountered an Access Violation at 01A95154' in the
browser window but the PHP-script dows not execute anything after the
query.
Strange enough a check of the database shows the query itself being
successful.
If I now replace
mssql_query($statement,$dbh);
with
$var = mssql_query($statement,$dbh);
the script continues working and everything seems to be ok.
But having an update statement in a loop you will have to change the name
of the variable (called $var above), otherwise this fails after the first
loop.
Further problems occuring with mssql-queries in selfdefined functions ...
the above workaround seems not to work in functions.
--
Edit bug report at http://bugs.php.net/?id=20826&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20826&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=20826&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=20826&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20826&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=20826&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=20826&r=support
Expected behavior: http://bugs.php.net/fix.php?id=20826&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=20826&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=20826&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=20826&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20826&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=20826&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=20826&r=isapi