Commit 1ac2fe66 by Adarsh K

API changes

parent 6b6e6556
...@@ -27,7 +27,7 @@ class Handle_model extends CI_Model { ...@@ -27,7 +27,7 @@ class Handle_model extends CI_Model {
} }
function registration($data) { function registration($data) {
$dup = $this->db->query("SELECT customer.email_id, customer.phone_no FROM `users` LEFT JOIN customer ON users.user_type = customer.user_type WHERE (users.username = '".$data['email_id']."' OR customer.phone_no = '".$data['phone_no']."')"); $dup = $this->db->query("SELECT customer.email_id, customer.phone_no FROM `users` LEFT JOIN customer ON users.user_type = customer.user_type WHERE (users.username = '".$data['email_id']."' OR customer.phone_no = '".$data['phone_no']."') GROUP BY customer.id");
if($dup->num_rows() > 0) { if($dup->num_rows() > 0) {
if($dup->num_rows() > 1) { if($dup->num_rows() > 1) {
$res = array('status'=> 0,'message'=>'Email and Phone are already exists','code'=>'009'); $res = array('status'=> 0,'message'=>'Email and Phone are already exists','code'=>'009');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment