I have used
add_filter( 'posts_where', array(&$this, 'new_filter_where' ));
function edcal_new_filter_where($where = '') {
global $wpdb;
$where .= " AND (($wpdb->postmeta.meta_key = 'assignto' AND $wpdb->postmeta.meta_value = '7')) ";
return where;
}
now how to print sql query that fired by my filter?