Download the PHP package websitesql/database without Composer
On this page you can find all versions of the php package websitesql/database. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download websitesql/database
More information about websitesql/database
Files in websitesql/database
Download websitesql/database
More information about websitesql/database
Files in websitesql/database
Vendor websitesql
Package database
Short Description The lightweight PHP database framework to accelerate development and reduce complexity.
License MIT
Package database
Short Description The lightweight PHP database framework to accelerate development and reduce complexity.
License MIT
Please rate this library. Is it a good library?
Informations about the package database
WebsiteSQL Database
A powerful database wrapper library built on top of Medoo, providing a simple and intuitive interface for database operations in PHP applications.
Installation
Basic Usage
Initialization
CRUD Operations
Select Data
Insert Data
Update Data
Delete Data
Migrations
The database library includes a migration system for managing database schema changes:
API Reference
Base Operations
query(string $statement, array $map = []): Execute raw SQL queriesexec(string $statement): Execute raw statementcreate(string $table, array $columns, array $options = null): Create a tabledrop(string $table): Drop a tableselect(string $table, array $join, array|string $columns = null, array $where = null): Select dataget(string $table, array $join, array|string $columns = null, array $where = null): Get a single recordinsert(string $table, array $values, string $primaryKey = null): Insert dataupdate(string $table, array $data, array $where = null): Update datadelete(string $table, array $where = null): Delete datareplace(string $table, array $columns, array $where = null): Replace data
Aggregation
count(string $table, array $join = null, string $column = null, array $where = null): Count rowsavg(string $table, array $join, string $column = null, array $where = null): Calculate averagemax(string $table, array $join, string $column = null, array $where = null): Get maximum valuemin(string $table, array $join, string $column = null, array $where = null): Get minimum valuesum(string $table, array $join, string $column = null, array $where = null): Calculate sum
Transactions
action(callable $actions): Execute callback in transactionbeginTransaction(): Begin a transactioncommit(): Commit a transactionrollBack(): Rollback a transaction
Utilities
id(?string $name = null): Get last inserted IDpdo(): Get PDO instancedebug(): Get the last query for debugginglog(): Get query loginfo(): Get database connection infoerror(): Get error informationrand(string $table, array $join = null, array|string $columns = null, array $where = null): Get random recordshas(string $table, array $join, array $where = null): Check if records exist
Migrations
migrations()->up(): Run pending migrationsmigrations()->down(): Rollback the last batch of migrationsmigrations()->reset(): Rollback all migrationsmigrations()->refresh(): Rollback all and run again
License
MIT
All versions of database with dependencies
PHP Build Version
Package Version
The package websitesql/database contains the following files
Loading the files please wait ...