thinkphp如何打印sql语句?

比如 $member = M("member");   

$map['id'] = 1;   

$result = $member->where($map)->delete();
SQL语句应该是delete * from table member where id = 1; 
怎样输出这个sql判断?

------解决方法--------------------
getLastSql
------解决方法--------------------
echo  M("member")->getLastSql();