0
每當我使用SQL查詢插入數據時,都會出現錯誤。我懷疑這是因爲$post
值中的撇號。使用特殊字符的MySQL查詢
SQL查詢是:
$sql="INSERT INTO posts (id_str, post, time, rt) VALUES ('$id_str','$post', '$time', '$rt')";
但我$post
值
$post = "My test posts are not as 'inconsistent' as before";
我應該怎麼辦?
沒錯。在接受來自用戶的輸入之前,總是試圖查看安全問題。 – 2012-01-12 02:11:51