Display SQL generated by $DB methods

If you need to debug the SQL generated by any of the $DB methods (DML API), you can use the following around the statement(s) to display the SQL:

$DB->set_debug(true);

//...

$DB->set_debug(false);