PHP操做mysql 防注入 mysql

參數化綁定php $mysqli=new mysqli('localhost','root','root','weibo'); //參數用 ? 代替 $stmt = $mysqli->prepare("SELECT * FROM users WHERE `name`= ? and pwd = ?"); //綁定參數 第一個參數爲sql參數的類型(i爲int,d爲double,s爲string)
相關文章
相關標籤/搜索