Skip to content

Examples

Greg Bowler edited this page Apr 2, 2026 · 2 revisions

The example/ directory is the quickest way to see the library in action without creating a full project first.

Example index:

  1. example/01-quick-start.php A minimal connection and query call.
  2. example/02-parameter-binding.php Positional and named binding.
  3. example/03-type-safe-getters.php Single-value helpers and typed row access.
  4. example/04-dynamic-bindings.php Dynamic binding helpers.
  5. example/05-database-migrations.php Canonical migration flow.
  6. example/06-multiple-connections.php Multiple named database connections.
  7. example/07-php-query-collections.php PHP query collections.

Each example creates an isolated workspace, runs the demonstration, and cleans up afterwards. That makes them safe to run repeatedly while learning.

Note

These examples show the Database component in isolation. In WebEngine, the same query and migration ideas are used, but the surrounding application wiring is handled for you. The WebEngine overview is at https://www.php.gt/webengine/database/.

Clone this wiki locally