Toggle navigation
Sloths Framework
Documentation
Getting Started
Installation
System Requirements
Application
Application Structure
Server Configuration
Routing
Request
Response
View
Helpers
Custom Helpers
Database
Connection
Query Builder
ORM
Defining Models
Model Interaction
Overview
Model
Collection
Relationship
Overview
Has One
Has Many
Belongs To
Has Many Through
Database Connection
$connection = new Sloths\Db\Connection('localhost', 3306, 'username', 'password', 'my-dbname'); $connection->query("SELECT * FROM users"); $connection->exec("DELETE FROM users WHERE id = 1"); $select = new Sloths\Db\Sql\Select(); //... $connection->select($select); $connection->selectAll($select); $connection->selectAllWithFoundRows($select); $connection->selectColumn($select); $insert = new Sloths\Db\Sql\Insert(); $connection->insert($insert); $update = new Sloths\Db\Sql\Update(); $connection->update($update); $delete = new Sloths\Db\Sql\Delete(); $connection->delete($delete);
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus