ID: 31120 Updated by: [EMAIL PROTECTED] Reported By: ssc at coolspot dot de -Status: Open +Status: Assigned Bug Type: MSSQL related Operating System: Linux PHP Version: 4.3.10 -Assigned To: +Assigned To: fmk
Previous Comments: ------------------------------------------------------------------------ [2004-12-16 15:37:16] richard dot quadling at bandvulc dot co dot uk As a proof of a change in the php_mssql.dll extension, I took the same code and ran it through V5.0.3 of php with the V5.0.2 version of php_mssql.dll (after a little bit of hex editing to fool the API release date!). The output is ... array ( 'ID' => 1, 'Name' => 'Richard ', ) array ( 'ID' => 2, 'Name' => 'Sally ', ) $bFlag = true array ( 'ID' => 1, 'Name' => 'Richard ', ) array ( 'ID' => 2, 'Name' => 'Sally ', ) array ( 'ID' => 3, 'Name' => 'Hesper ', ) array ( 'ID' => 4, 'Name' => 'Noodle ', ) The result from the mssql_query() for the same insert statement is True. Richard. ------------------------------------------------------------------------ [2004-12-16 15:34:08] richard dot quadling at bandvulc dot co dot uk Sorry. The CORRECT results for the output is ... array ( 'ID' => 1, 'Name' => 'Richard ', ) array ( 'ID' => 2, 'Name' => 'Sally ', ) array ( 'ID' => 3, 'Name' => 'Hesper ', ) $bFlag = false array ( 'ID' => 1, 'Name' => 'Richard ', ) array ( 'ID' => 2, 'Name' => 'Sally ', ) array ( 'ID' => 3, 'Name' => 'Hesper ', ) array ( 'ID' => 4, 'Name' => 'Noodle ', ) ------------------------------------------------------------------------ [2004-12-16 15:33:11] richard dot quadling at bandvulc dot co dot uk Something similar is happening in V5.0.3 on Windows XP. I would check that the data is being entered, but the return from the mssql_query() statement is actually False!!!! E.G. <?php $rConn = mssql_connect('localhost','sa','sa'); mssql_select_db('BandvulcForums'); $rResults = mssql_query('SELECT * FROM dbo.Test'); while ($row = mssql_fetch_assoc($rResults)) { echo '<pre>' . var_export($row, True) . '</pre>'; } mssql_free_result($rResults); $bFlag = mssql_query("INSERT dbo.Test VALUES ('Noodle');"); echo "\$bFlag = " . var_export($bFlag, True); $rResults = mssql_query('SELECT * FROM dbo.Test'); while ($row = mssql_fetch_assoc($rResults)) { echo '<pre>' . var_export($row, True) . '</pre>'; } mssql_free_result($rResults); mssql_close($rConn); ?> With the table holding names of Sally, Richard and Hesper, the output is ... array ( 'ID' => 1, 'Name' => 'Richard ', ) array ( 'ID' => 2, 'Name' => 'Sally ', ) array ( 'ID' => 3, 'Name' => 'Hesper ', ) array ( 'ID' => 12, 'Name' => 'Noodle ', ) $bFlag = false array ( 'ID' => 1, 'Name' => 'Richard ', ) array ( 'ID' => 2, 'Name' => 'Sally ', ) array ( 'ID' => 3, 'Name' => 'Hesper ', ) array ( 'ID' => 4, 'Name' => 'Noodle ', ) Which I think is the issue. I'm having this issue with phpBB. Richard. ------------------------------------------------------------------------ [2004-12-16 12:38:40] ssc at coolspot dot de Description: ------------ After upgrading PHP 4.3.9 to 4.3.10, no inserts are possible in our MS SQL Tables. Solving the problem means : 1. Switch back to 4.3.9 2. Replace contents of the php-4.3.10/ext/mssql with that from 4.3.9 I can send you my php_mssql* files for reference. Expected result: ---------------- Insert data into MS SQL tables Actual result: -------------- No inserts ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31120&edit=1