How to find and delete with Active Record I'm trying to learn how to add and delete records using Active Record.

This works to add:

$instance = new Calendar37Record;
$instance-&gt;timestr = $timestr;
$success = $instance-&gt;save();


Given that I know the id of the record to delete, is the process to find the record and then delete it? Or can you just delete it?  I tried this, but it doesn't seem to find the record, and it complains 'The active record cannot be deleted because it is new.':

$instance = new Calendar37Record;
$instance-&gt;findByPk($id); 
$success = $instance-&gt;delete(); 


Thank you for any help!
Have you tried  

$instance = new Calendar37Record;
$instance-&gt;deleteByPk($id);