Hi there. Is there a way to delete a row without using find() before?
This is how it's explained on docs:
<?php
foreach (Robots::find("type='mechanical'") as $robot) {
if ($robot->delete() == false) {
echo "Sorry, we can't delete the robot right now: \n";
foreach ($robot->getMessages() as $message) {
echo $message, "\n";
}
} else {
echo "The robot was deleted successfully!";
}
}
I'd like to just delete the row, like this, to avoid unnecessary queries on database:
Robots:delete( $id );
Thanks in advance!