PHP - GetSQLValueString function

后端 未结 4 386
臣服心动
臣服心动 2020-12-04 02:13

I see a function GetSQLValueString and I don\'t know what is it dealing with, could someone give me some idea?
Thanks you

function GetSQLValueString($t         


        
4条回答
  •  伪装坚强ぢ
    2020-12-04 03:10

    From my understanding this function is probably to escape some data to pass it to MySQL. The function also handles null values and put some quotes if needed.

    it should be used this way

    GetSQLValueString("a value that I want to escape's", 'text');
    

    see the SQL injection problem to understand why this function exists

提交回复
热议问题