[eluser]sophistry[/eluser]
um, i dont' think that would work...
try just getting the result into a variable and using it in the query.
Code:
$id = $CI->input->post('fieldname');
$query = $CI->db->query("SELECT COUNT(*) dupe FROM $table WHERE $column = ‘$str’ AND id != '$id'");