same issue.. thanks folks for the fix. did pretty much as RoamFree suggested but just amended that line to:
$title = $wpdb->escape($item->get_title());
to save editing the query.
thanks again folks.. saved me lots of messing about to figure it out myself!