mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-20 09:30:49 +08:00
add Redis for cache and Mysqli for database query
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
interface DBInterface
|
||||
{
|
||||
public function connect($host, $username, $password, $database, $port);
|
||||
|
||||
public function query(string $sql);
|
||||
|
||||
public function error(): string;
|
||||
|
||||
public function errno(): int;
|
||||
|
||||
public function numRows($result): int;
|
||||
|
||||
public function selectDb($database);
|
||||
|
||||
public function fetchAssoc($result): array|null;
|
||||
|
||||
public function fetchRow($result): array|null;
|
||||
|
||||
public function affectedRows(): int;
|
||||
|
||||
public function escapeString(string $string): string;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user