Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14343

form_validation two is_unique

$
0
0
Hello

I've a little issue, in my view receive one param by post named GatewayId

This is my controller

Code:
$this->load->model("DeleteExpense_model");

   $GatewayId = $this->input->post('GatewayId');

   $this->form_validation->set_rules('GatewayId', 'GatewayId', 'is_unique[tab_expense.tab_gateway_id]');
   $RESULTA=$this->form_validation->run();

   $this->form_validation->set_rules('GatewayId', 'GatewayId', 'is_unique[tab_income.tab_gateway_id]');
   $RESULTE=$this->form_validation->run();

I want to check in two tables, then problem is that return false in both cases, if I run by separate work as well, it should retunr in the first case true and false in the other but seems like the second check overwrite the first, can somebody help me?

Thank you advance!.

Viewing all articles
Browse latest Browse all 14343

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>