[英]PHP MSSQL Query not executing
我在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;
}
用替換&
.
應該是這樣的: '" . $var . "'
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.