How can I view the contents of a prepared statement?

后端 未结 6 2058
慢半拍i
慢半拍i 2020-12-06 15:54

I\'m working on learning to use prepared statements with mysqli in PHP and usually, if I\'m having a problem with a query I just echo it to the screen to see what it looks l

6条回答
  •  独厮守ぢ
    2020-12-06 16:47

    Agreeing with Pascal MARTIN (+1) so I suggest another technique for debugging: var_dump() or log every variable you're inserting into the statement, that way you should be able to figure out if it is wrong data or logically wrong SQL.

提交回复
热议问题