FIX : cast int sql
This commit is contained in:
parent
732724ea51
commit
b73e1019ed
@ -849,7 +849,7 @@ class StockTransfer extends CommonObject
|
||||
$sql = 'SELECT rowid, date_creation as datec, tms as datem,';
|
||||
$sql .= ' fk_user_creat, fk_user_modif';
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t';
|
||||
$sql .= ' WHERE t.rowid = '.$id;
|
||||
$sql .= ' WHERE t.rowid = '.((int) $id);
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
if ($this->db->num_rows($result)) {
|
||||
|
||||
@ -873,7 +873,7 @@ class StockTransferLine extends CommonObjectLine
|
||||
$sql = 'SELECT rowid, date_creation as datec, tms as datem,';
|
||||
$sql .= ' fk_user_creat, fk_user_modif';
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t';
|
||||
$sql .= ' WHERE t.rowid = '.$id;
|
||||
$sql .= ' WHERE t.rowid = '.((int) $id);
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
if ($this->db->num_rows($result)) {
|
||||
@ -929,7 +929,7 @@ class StockTransferLine extends CommonObjectLine
|
||||
$this->lines = array();
|
||||
|
||||
$objectline = new StockTransferLineLine($this->db);
|
||||
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_stocktransferline = '.$this->id));
|
||||
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_stocktransferline = '.((int) $this->id)));
|
||||
|
||||
if (is_numeric($result)) {
|
||||
$this->error = $this->error;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user