WP QueryBuilderDocumentationDocumentationAuthorAuthor (opens in a new tab)DonationDonation
GitHubGitHub (opens in a new tab)
  • Documentation
    • Getting Started
    • Library API
      • Alter API
      • Create API
      • Delete API
      • Select API
      • Update API
    • Query Driver
  • Examples
    • Alter Statement
    • Create Statement
    • Delete Statement
    • Drop Statement
    • Insert Statement
    • Select Statement
    • Update Statement
  • Donation
  • Documentation
  • Documentation
    • Getting Started
    • Library API
      • Alter API
      • Create API
      • Delete API
      • Select API
      • Update API
    • Query Driver
  • Examples
    • Alter Statement
    • Create Statement
    • Delete Statement
    • Drop Statement
    • Insert Statement
    • Select Statement
    • Update Statement
  • Author (opens in a new tab)
  • Donation
  • Donation

On This Page

  • Delete data from table
Question? Give us feedback → (opens in a new tab)Edit this page
Examples
Delete Statement

Delete Statement

Delete data from table

Delete one row

$db::delete('posts')
    ->where('ID', '=', 3)
    ->execute();

Delete all records in a table

$db::delete('posts')->execute();

Get only raw SQL without DB execution.

$sql=
$db::delete('posts')
    ->where('ID', '=', 3)
    ->getSql();
Create StatementDrop Statement

Copyright © 2022–2026 Keramot UL Islam