<div dir="auto">Use vtws_delete() twice to delete from db.<div dir="auto">To physically delete the attachments just get the path and file name from db and then proceed to delete the files via script.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il gio 3 mar 2022, 13:29 Tiziano Morgia <<a href="mailto:tiziano.morgia@gmail.com">tiziano.morgia@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi to all,</div>   we have a vTiger instance that contains a high number of custom modules on which we import, through php scripts, a high number of data including attachments.<br>   We therefore need to cancel the following types of data when importing data and / or through scheduled activities:<br><div>- Records of custom modules<br></div>- Attachments to the records of the previous point (including associated files on disk)<br>- Contain the number of records of the change history (if active on the module). For example, keep the last 10 changes for each single entity.<br><br>We can delete it directly using db query ($adb->query("DELETE FROM xxx");) but I think that there is a correct way, using the vtlib or similar, to delete the three types of data, or not?<br>I tried to search but find nothing about it.<br>Has anyone had a similar need?<br><br><div>Thanks in advance,</div><div>Tiziano</div><div><br></div></div>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div>