Код: Выделить всё
public function generate_uuid()
{
return "it is returning SOME unique ID";
}
public function getUniqueIdentifier()
{
$Uuid = '';
$checkStatus = true;
while ($checkStatus)
{
$Uuid = $this->generate_uuid();
$checkQry2 = "select * from Leads where controllNumber=" . $this->db->escape($Uuid);
$checkRes2 = $this->db->query($checkQry2);
$checkRes2 = $checkRes2->num_rows();
if ($checkRes2 === 0)
{
$checkStatus = false;
}
}
return $Uuid;
}
Код: Выделить всё
$this->modObject->getUniqueIdentifier();
Может ли кто-нибудь помочь устранить эту ошибку?
Подробнее здесь: https://stackoverflow.com/questions/574 ... on-boolean
Мобильная версия