strukt / pkg-db
Database
Installs: 239
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:strukt-module
Requires
- fakerphp/faker: *
- gabordemooij/redbean: dev-master
- monolog/monolog: *
- popphp/pop-db: ^6.5.11
- strukt/framework: v1.1.7-alpha
- symfony/string: 6.4.x-dev
This package is not auto-updated.
Last update: 2025-01-02 22:46:27 UTC
README
transaction
require "bootstrap.php"; useDb("pop"); pdo()->transact(function(){ $role = db("role"); $role->name = "superadmin"; $role->save(); $user = db("user"); $user->username = "sadmin@tenure"; $user->password = sha1("p@55w0rd!!"); $user->role_id = "abc"; //invalid entry expect a number $user->save(); });