Search
 
SCRIPT & CODE EXAMPLE
 

PHP

is_unique in codeigniter form validation

$this->form_validation->set_rules('order_no', 'Order no', 'required|callback_check_order_no');
Comment

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();
    }
Comment

is_unique in codeigniter form validation

function check_order_no($order_no) {        
        if($this->input->post('id'))
            $id = $this->input->post('id');
        else
            $id = '';
        $result = $this->Data_model->check_unique_order_no($id, $order_no);
        if($result == 0)
            $response = true;
        else {
            $this->form_validation->set_message('check_order_no', 'Order no already exist');
            $response = false;
        }
        return $response;
    }
Comment

PREVIOUS NEXT
Code Example
Php :: laravel model save get id 
Php :: laravel module make migration 
Php :: laravel throttle 
Php :: Laravel Retrieve All Session Data 
Php :: laravel eloquent group by week 
Php :: searchable dropdown laravel blade 
Php :: phpmyadmin username password check 
Php :: laravel create mode 
Php :: php unlink 
Php :: valdidate laravel if falid 
Php :: laravel controller in details 
Php :: check if string contains only whitespace php 
Php :: laravel eloquent relationships count 
Php :: check if string contains substring php 8 
Php :: Make a Woo required field not required 
Php :: how to get a sum of a column in lravel 
Php :: laravel request password validation rule 
Php :: if condition in php 
Php :: get curret timedate php 
Php :: laravel groupby and latest 
Php :: set php var to html 
Php :: display image from mysqli database 
Php :: php new line 
Php :: Creating default object from empty value 
Php :: php html template if conditions 
Php :: how create migration in laravel 
Php :: php .= 
Php :: wherehas laravel search 
Php :: php time() 
Php :: cakephp 4 change layout view in a method 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =