I find I need to write queries without using CI's active record frequently for example:
$query = "INSERT INTO votes (userid, itemId) VALUES ({$userId},{$itemId})
ON DUPLICATE KEY UPDATE weight = {$vote}";
$query = $this->db->query($query);
Should I be worried about performance or security loss because of this?