ID: 38870
Updated by: [EMAIL PROTECTED]
Reported By: howardt at calhounisd dot org
-Status: Open
+Status: Feedback
Bug Type: MSSQL related
Operating System: Windows XP, Windows Server 2000
PHP Version: 4.4.4
New Comment:
Set display_errors to On, error_reporting to E_ALL and restart the
webserver.
Please post the error message you get after that.
Previous Comments:
------------------------------------------------------------------------
[2006-09-18 17:36:45] howardt at calhounisd dot org
Description:
------------
When running an INSERT command through MSSQL_Query, the transaction is
successful (the record is inserted) but the script immediately dies
("OR die(...)" is executed). I have followed what documentation I can
find on the PHP site, but it dies every time. This does not occur on
SELECT or UPDATE commands.
Reproduce code:
---------------
<?
$MSSQL_Link = MSSQL_Connect($DistrictServer, "UserID", "password");
MSSQL_Select_DB($DistrictServerDB, $MSSQL_Link);
$Insert_Query = "INSERT INTO table(SchoolID, StateID)
VALUES('$StudentNum', '$stateid')";
$Insert_Result = MSSQL_Query($Insert_Query, $MSSQL_Link) OR die("Could
not insert record. " . $Insert_Query);
echo "Success";
?>
Expected result:
----------------
"Success" should be displayed on the page.
Actual result:
--------------
"Could not insert record. INSERT INTO table(SchoolID, StateID)
VALUES('123456', '987654')" is displayed instead.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38870&edit=1