March 2019
Intermediate to advanced
580 pages
15h 3m
English
Lastly, we can also get rid of our records using the DELETE query:
$result = $database->delete('players') ->condition('name', 'Micheal P.') ->execute();
All records that match the condition will get removed. Be careful with this because, as with update queries, leaving out a condition will basically truncate your table. The query will return the number of records affected, that is, deleted.
Read now
Unlock full access