Add giftcard number autogeneration

This commit is contained in:
jekkos-t520
2014-12-16 18:36:26 +01:00
parent 07a32a0deb
commit efff9d20c1
3 changed files with 12 additions and 4 deletions

View File

@@ -13,6 +13,13 @@ class Giftcard extends CI_Model
return ($query->num_rows()==1);
}
function get_max_number ( )
{
$this->db->select_max('giftcard_number');
$query = $this->db->get('giftcards');
return $query->row();
}
/*
Returns all the giftcards