added code types into README
This commit is contained in:
parent
8bd802239e
commit
ae4f73ecb6
13
README.md
13
README.md
@ -6,8 +6,7 @@ This library extends the builtin PDO object by several useful features.
|
||||
|
||||
For testing create database `test` with user `test` and password `test`. In database create table `test` and insert same testing data.
|
||||
|
||||
```
|
||||
|
||||
```sql
|
||||
CREATE TABLE `test` (
|
||||
`id` int(11) PRIMARY KEY NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) DEFAULT NULL,
|
||||
@ -18,7 +17,7 @@ CREATE TABLE `test` (
|
||||
|
||||
For basic testing run this code
|
||||
|
||||
```
|
||||
```php
|
||||
<?php
|
||||
|
||||
require_once __DIR__.'/../src/DBmodel.php';
|
||||
@ -53,7 +52,7 @@ print_r($result);
|
||||
|
||||
Create file `creatorModel.php` and paste bellow code
|
||||
|
||||
```
|
||||
```php
|
||||
<?php
|
||||
|
||||
require_once __DIR__.'/../src/DBmodel.php';
|
||||
@ -70,7 +69,7 @@ $creator->interact();
|
||||
|
||||
now for each table run `php createModel.php` for interactive creating class for table.
|
||||
|
||||
```
|
||||
```bash
|
||||
$ php test2.php
|
||||
New model name: Test
|
||||
Table name: test
|
||||
@ -82,7 +81,7 @@ Creating MODEL class ... MODEL class created
|
||||
|
||||
Creator build this MODEL class file
|
||||
|
||||
```
|
||||
```php
|
||||
<?php
|
||||
/*
|
||||
TPsoft.org 2000-2025
|
||||
@ -155,7 +154,7 @@ class Test extends \TPsoft\DBmodel\DBmodel {
|
||||
|
||||
Illustrative example
|
||||
|
||||
```
|
||||
```php
|
||||
<?php
|
||||
|
||||
require_once __DIR__.'/../src/DBmodel.php';
|
||||
|
Loading…
x
Reference in New Issue
Block a user