2 sam2kb Jan 19, 2010 20:54

The actual code will be
global $DB, $Blog;
$items_with_tags = $DB->get_col('SELECT itag_itm_ID FROM T_items__itemtag');
$items_without_tags = $DB->get_col('SELECT post_ID FROM T_items__item WHERE post_ID NOT IN ( '.implode( ',', $items_with_tags ).' )');
// Create empty List:
$ItemList = & new ItemList2( $Blog, NULL, NULL );
// Filter list:
$ItemList->set_filters( array(
'post_ID_list' => implode( ',', $items_without_tags ),
) );
// Get ready for display (runs the query):
$ItemList->display_init();
if( $ItemList->result_num_rows )
{
while( $Item = & $ItemList->get_item() )
{
echo $Item->title.'<br />';
}
}
Ah-ha. And thank you for the impromptu lesson on how to use the built-in b2evo SQL functions, which was my next bit of work. :)
Once you get item IDs you can use ItemList and set_filters
Use T_ prefix in your queries, it will be automatically replaced with the real tables prefix