I want to delete an entry in my custom module table, in a similar way to this select:
$select = $this->getConnection()->select()->from(
['*' => $this->getMainTable()]
)->where(
'quote_ref = ?',
$quote_ref
);
$data = $this->getConnection()->fetchOne($select);
I am using the following code:
public function deleteByRef($quote_ref = null)
{
$delete = $this->getConnection()->delete();
}
And getting the following error:
1 exception(s):
Exception #0 (Exception): Warning: Missing argument 1 for Zend_Db_Adapter_Abstract::delete(), called in C:\laragon\www\websitestore\app\code\Website\Quote\Model\ResourceModel\Data.php on line 43 and defined in C:\laragon\www\websitestore\vendor\magento\zendframework1\library\Zend\Db\Adapter\Abstract.php on line 650
How can I pass parameters to the delete method?