Fixed Item exists where issue (#666)

This commit is contained in:
FrancescoUK
2016-08-02 17:25:49 +01:00
parent 5f1d9e7f45
commit 4ea056e3f7

View File

@@ -7,7 +7,7 @@ class Item extends CI_Model
public function exists($item_id, $ignore_deleted = FALSE, $deleted = FALSE)
{
$this->db->from('items');
$this->db->like('item_id', $item_id);
$this->db->where('CAST(item_id AS CHAR) = ', $item_id);
if($ignore_deleted == FALSE)
{
$this->db->where('deleted', $deleted);