Fix hard coded table prefix
This commit is contained in:
parent
625213580c
commit
2c5e1c17fe
@ -3483,17 +3483,17 @@ class Societe extends CommonObject
|
||||
* Because this function is meant to be executed within a transaction, we won't take care of it.
|
||||
*/
|
||||
$sql = 'SELECT rowid
|
||||
FROM llx_societe_commerciaux
|
||||
FROM '.MAIN_DB_PREFIX.'societe_commerciaux
|
||||
WHERE fk_soc = '.(int) $dest_id.' AND fk_user IN (
|
||||
SELECT fk_user
|
||||
FROM llx_societe_commerciaux
|
||||
FROM '.MAIN_DB_PREFIX.'societe_commerciaux
|
||||
WHERE fk_soc = '.(int) $origin_id.'
|
||||
);';
|
||||
|
||||
$query = $db->query($sql);
|
||||
|
||||
while ($result = $db->fetch_object($query)) {
|
||||
$db->query('DELETE FROM llx_societe_commerciaux WHERE rowid = '.$result->rowid);
|
||||
$db->query('DELETE FROM '.MAIN_DB_PREFIX.'societe_commerciaux WHERE rowid = '.$result->rowid);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user