Insert Data into MSSQL DB using PHP

后端 未结 4 1056
轻奢々
轻奢々 2020-12-22 03:37

Hello there am trying to insert data into MSSQL using PHP. I have tried many times to figure out what the problem might be but i seem not to find it. Is there something am n

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-22 04:26

    Is this supposed to be a variable?

    $query = "INSERT INTO dbo.[CAGD$Leave Plan] ([No_],[Employee No
                                   ^^^^^^
    

    If so, then it's apparently undefined in your code, and the generated query string will contain dbo.[CAGD Plan], and not whatever value was supposed to be in that variable. If the $ is literally in your table name, then it should be CAGD\$Leave, so that $Leave isn't treated as a variable.

提交回复
热议问题