作者justinC (無)
看板PHP
標題[請益] 刪除語法執行問題
時間Mon Feb 20 20:15:25 2006
如果 delete xxxxx xxxx where xxx=bb;
後面bb亂改 命令一樣可執行 但是
有沒有辦法判斷 到底真的有刪除資料列 跟 沒刪除任何一列
用if(mysql_query($sql)) 只能判斷命令有無成功 即使bb是錯得資料也沒辦法得知..
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.221.120.127
1F:推 chhuang:mysql_affected_rows -- Get number of affected rows 02/20 20:38
2F:推 justinC:謝啦 我在試試看 02/20 23:17