Commit 365cebd2 by Jansa Jose

phone number changes

parent 4bbcc9ec
......@@ -42,7 +42,7 @@ class Api_model extends CI_Model {
function register($data) {
try{
$email = $data['email_id'];
$phone = $data['phone'];
$phone = preg_replace('/\D/', '', $data['phone']);
$res_count =
$this->db->query("SELECT * FROM customer
INNER JOIN `users` ON users.id=customer.customer_id AND users.user_type='3'
......
......@@ -103,6 +103,7 @@ class Webservice_model extends CI_Model {
try{
$is_email_available = "true";
$is_phone_available = "true";
$data['phone'] = preg_replace('/\D/', '', $data['phone']);
$res_count = $this->db->where('email',$data['email'])->or_where('phone',$data['phone'])->get('customer')->result();
if(count($res_count) > 0) {
foreach ($res_count as $rs) {
......@@ -130,7 +131,7 @@ class Webservice_model extends CI_Model {
function register($data) {
try{
$email = $data['email'];
$phone = $data['phone'];
$phone = preg_replace('/\D/', '', $data['phone']);
$res_count = $this->db->query("SELECT * FROM customer
INNER JOIN `users` ON users.id=customer.customer_id AND users.user_type='3'
WHERE users.status!='2' AND
......
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