Ajout fonction delete
This commit is contained in:
parent
241c6a6836
commit
dd53307916
@ -586,6 +586,30 @@ class Propal
|
|||||||
print $this->db->error();
|
print $this->db->error();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function delete()
|
||||||
|
{
|
||||||
|
$sql = "DELETE FROM llx_propal WHERE rowid = $this->id;";
|
||||||
|
if ( $this->db->query($sql) )
|
||||||
|
{
|
||||||
|
$sql = "DELETE FROM llx_propaldet WHERE fk_propal = $this->id ;";
|
||||||
|
if ( $this->db->query($sql) )
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class PropaleLigne
|
class PropaleLigne
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user