Skip to content
Snippets Groups Projects
Commit 00dbfcb5 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Portability of SQL request

parent 52fcb3b6
No related branches found
No related tags found
No related merge requests found
......@@ -857,13 +857,13 @@ class Adherent extends CommonObject
{
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."adherent WHERE login='$login'";
$result=$this->db->query( $sql);
$resql=$this->db->query( $sql);
if ($result)
if ($resql)
{
if ($this->db->num_rows())
if ($this->db->num_rows($resql))
{
$obj = $this->db->fetch_object($result);
$obj = $this->db->fetch_object($resql);
$this->fetch($obj->rowid);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment