Fix: possibility to defined rang with an external module
This commit is contained in:
parent
62c5501fb1
commit
741a010df0
@ -830,6 +830,23 @@ class CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get rowid of the line relative to its position
|
||||||
|
* @result int Rowid of the line
|
||||||
|
*/
|
||||||
|
function getIdOfLine($rang)
|
||||||
|
{
|
||||||
|
$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.$this->table_element_line;
|
||||||
|
$sql.= ' WHERE '.$this->fk_element.' = '.$this->id;
|
||||||
|
$sql.= ' AND rang = '.$rang;
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
if ($resql)
|
||||||
|
{
|
||||||
|
$row = $this->db->fetch_row($resql);
|
||||||
|
return $row[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get max value used for position of line (rang)
|
* Get max value used for position of line (rang)
|
||||||
* @result int Max value of rang in table of lines
|
* @result int Max value of rang in table of lines
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user