Download the PHP package davidlienhard/database without Composer
On this page you can find all versions of the php package davidlienhard/database. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download davidlienhard/database
More information about davidlienhard/database
Files in davidlienhard/database
Download davidlienhard/database
More information about davidlienhard/database
Files in davidlienhard/database
Vendor davidlienhard
Package database
Short Description 🐘 php library for easy access to databases
License MIT
Homepage https://github.com/davidlienhard/database/
Package database
Short Description 🐘 php library for easy access to databases
License MIT
Homepage https://github.com/davidlienhard/database/
Please rate this library. Is it a good library?
Informations about the package database
davidlienhard/database
🐘 php library for easy access to databases
Setup
You can install through composer with:
Note: davidlienhard/database requires PHP 8.4
Examples
Connect to the Database-Server
Fetch Results as Objects (Recommended)
Fetching Multiple Rows as Objects
Fetching a Single Row as Object
Fetch Results as Arrays
Fetching Multiple Rows as Associative Arrays
Fetching a Single Row as Associative Array
Select Query with Parameters
Insert Query
Update Query
Transactions
API Overview
Fetch Methods
fetch_object(ResultType $resultType = assoc): RowInterface|null- Returns aRowInterfaceobject that wraps the row data. Use$row->get('columnName')or$row->getAll()to access data.fetch_single_object(ResultType $resultType = assoc): RowInterface- Likefetch_object()but throwsNoRowsExceptionif no rows are available.fetch_array_assoc(): array|null- Returns an associative array with column names as keys.fetch_single_array_assoc(): array- Likefetch_array_assoc()but throwsNoRowsExceptionif no rows are available.fetch_array_num(): array|null- Returns an enumerated array with numeric indices.fetch_single_array_num(): array- Likefetch_array_num()but throwsNoRowsExceptionif no rows are available.fetch_array(ResultType $resultType): array|null- Generic fetch returning either associative or numeric arrays based on$resultType.
Deprecated Methods
The following methods are deprecated and should not be used in new code:
fetch_assoc()- Usefetch_array_assoc()insteadfetch_row()- Usefetch_array_num()instead
License
The MIT License (MIT). Please see LICENSE for more information.
All versions of database with dependencies
PHP Build Version
Package Version
The package davidlienhard/database contains the following files
Loading the files please wait ...