The Little Guy Posted August 21, 2010 Share Posted August 21, 2010 Is there a way to see what would happen if I test a query, basically see how many rows would be affected if I ran the query? so for example: "DELETE FROM tbl WHERE name LIKE '%bob%'" With the above, I just want to see which ones would have been deleted and not actually delete them. How can that be done? Link to comment https://forums.phpfreaks.com/topic/211340-query-test/ Share on other sites More sharing options...
RussellReal Posted August 21, 2010 Share Posted August 21, 2010 sure.. instead of "DELETE FROM tbl WHERE name LIKE '%bob%'" do "SELECT COUNT(*) As affected_rows FROM tbl WHERE name LIKE '%bob%'" Link to comment https://forums.phpfreaks.com/topic/211340-query-test/#findComment-1101958 Share on other sites More sharing options...
The Little Guy Posted August 21, 2010 Author Share Posted August 21, 2010 Thanks! Link to comment https://forums.phpfreaks.com/topic/211340-query-test/#findComment-1102180 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.