+ Fix bug agent phone number verification at the inscription
This commit is contained in:
parent
7a14e24929
commit
dddb654dca
|
@ -142,7 +142,14 @@ class DataBaseConnector
|
||||||
*/
|
*/
|
||||||
public function isPhoneExistedInCategory($phone, $category=null, $phoneTransaction=null){
|
public function isPhoneExistedInCategory($phone, $category=null, $phoneTransaction=null){
|
||||||
|
|
||||||
|
if(isset($phoneTransaction) and isset($phone)){
|
||||||
|
$result = mysqli_query($this->con,"SELECT na.phone from networks_agents na INNER JOIN codeGenerer cg ON na.codeGenerer_id=cg.id WHERE na.phone ='$phone' OR na.transactionNumber ='$phoneTransaction' LIMIT 1");
|
||||||
|
}else{
|
||||||
|
if(isset($phoneTransaction))
|
||||||
$result = mysqli_query($this->con,"SELECT na.phone from networks_agents na INNER JOIN codeGenerer cg ON na.codeGenerer_id=cg.id WHERE na.transactionNumber ='$phoneTransaction'");
|
$result = mysqli_query($this->con,"SELECT na.phone from networks_agents na INNER JOIN codeGenerer cg ON na.codeGenerer_id=cg.id WHERE na.transactionNumber ='$phoneTransaction'");
|
||||||
|
else
|
||||||
|
$result = mysqli_query($this->con,"SELECT na.phone from networks_agents na INNER JOIN codeGenerer cg ON na.codeGenerer_id=cg.id WHERE na.phone ='$phone' LIMIT 1");
|
||||||
|
}
|
||||||
if($result) {
|
if($result) {
|
||||||
$no_of_rows = mysqli_num_rows($result);
|
$no_of_rows = mysqli_num_rows($result);
|
||||||
if ($no_of_rows > 0) {
|
if ($no_of_rows > 0) {
|
||||||
|
|
Loading…
Reference in New Issue