Modif dand delete() pour la future gestion des contraintes

This commit is contained in:
Rodolphe Quiedeville 2003-09-17 13:04:52 +00:00
parent c997aca337
commit 77188fb1f4

View File

@ -598,10 +598,10 @@ class Propal
*/
Function delete()
{
$sql = "DELETE FROM llx_propal WHERE rowid = $this->id;";
$sql = "DELETE FROM llx_propaldet WHERE fk_propal = $this->id ;";
if ( $this->db->query($sql) )
{
$sql = "DELETE FROM llx_propaldet WHERE fk_propal = $this->id ;";
$sql = "DELETE FROM llx_propal WHERE rowid = $this->id;";
if ( $this->db->query($sql) )
{
return 1;