我有一個似乎並未執行的php中的mssql查詢。PHP MSSQL查詢沒有執行
有沒有人有任何想法?在SQL上運行分析器時,我所看到的只是被選中的數據庫。
$sth = mssql_query("ALTER TABLE " & $tablename & " ADD " & $newfield & " " & $type);
$save = mssql_query("INSET INTO SD_FIELDS (COLUMN_NAME, DISPLAY_NAME, SEQ_TABLE, DATA_TYPE, COLUMN_TYPE)
values ('" & $newfield & "', '" & $displayname & "', " & $tableseq & ", '" & $datatype & "', '" & $type & "'");
if ($sth)
{
if ($save)
{
$response["success"] = 1;
}
else
{
$response["success"] = 0;
$response["message"] = $save;
}
}
else
{
$response["success"] = 0;
$response["message"] = $sth;
}
你看到任何錯誤訊息?查看你的服務器日誌。 – 2013-10-01 20:55:36
在你的第二個查詢中,你的真實代碼中是否存在「INSET」輸入錯誤? –