Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

is_unique in codeigniter form validation

function check_unique_order_no($id = '', $order_no) {
        $this->db->where('order_no', $order_no);
        $this->db->where('status', "A");

        if($id) {
            $this->db->where_not_in('id', $id);
        }
        return $this->db->get('delivery_order')->num_rows();
    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #codeigniter #form #validation
ADD COMMENT
Topic
Name
5+8 =