File modules/database/README.md

Last commit: Mon Feb 24 18:36:11 2020 +0100	Jan Dankert	Documentation added.
1 # Database module 2 3 This module contains database specific functionality. 4 5 ## Usage 6 7 ### Initialisation 8 9 ``` 10 $database = new Database( [ 11 'dsn' =>'mysql:host=localhost; dbname=name; charset=utf8', 12 'user' =>'user',' 13 'password'=>'...' 14 ] ); 15 ``` 16 17 The `dsn` is described in the [PDO manual](https://www.php.net/manual/de/pdo.construct.php). 18 19 ## Executing queries 20 The database object is able to create Statement objects. You only have to apply a SQL query. 21 ``` 22 $statement = $database->sql('select * from table'); 23 24 $data = $statement->getRow(); 25 $data = $data['column']; 26 // ... 27 ```
Download modules/database/README.md
History Mon, 24 Feb 2020 18:36:11 +0100 Jan Dankert Documentation added.