@ishan
<?php
$conn = getConnection();
$sold_items = $conn->osc_dbFetchresult(sprintf('select count(v.i_sold) from %st_item i, %st_item_veronika v where i.pk_i_id = v.fk_i_item_id and i.fk_i_user_id = %d', DB_TABLE_PREFIX, DB_TABLE_PREFIX, osc_logged_user_id()));
print_r($sold_items);
?>
maybe this one