October 2017
Intermediate to advanced
566 pages
14h 31m
English
Lastly, we can also get rid of our records using the DELETE query:
$result = $database->delete('players') ->condition('name', 'Micheal P.') ->execute();
All the 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, and the query will return the number of records affected, that is, deleted.
Read now
Unlock full access