MyModel
in package
MyModel Model
This model demonstrates the usage of the Model class.
Table of Contents
Properties
- $db : mixed
Methods
- __construct() : mixed
- Constructor
- save() : mixed
- Save Method
Properties
$db
private
mixed
$db
Methods
__construct()
Constructor
public
__construct() : mixed
Initializes the database connection.
save()
Save Method
public
save() : mixed
This method creates the 'demo' table if it doesn't exist, inserts a new record with the provided 'demo' value, and returns the inserted 'demo' value.
Tags
Return values
mixed —The inserted 'demo' value or false on failure.