This commit is contained in:
Igor Miňo 2025-05-29 07:53:33 +02:00
commit 55e67bd8c2

View File

@ -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. 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` ( CREATE TABLE `test` (
`id` int(11) PRIMARY KEY NOT NULL AUTO_INCREMENT, `id` int(11) PRIMARY KEY NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL, `name` varchar(255) DEFAULT NULL,
@ -18,7 +17,7 @@ CREATE TABLE `test` (
For basic testing run this code For basic testing run this code
``` ```php
<?php <?php
require_once __DIR__.'/../src/DBmodel.php'; require_once __DIR__.'/../src/DBmodel.php';
@ -53,7 +52,7 @@ print_r($result);
Create file `creatorModel.php` and paste bellow code Create file `creatorModel.php` and paste bellow code
``` ```php
<?php <?php
require_once __DIR__.'/../src/DBmodel.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. now for each table run `php createModel.php` for interactive creating class for table.
``` ```bash
$ php test2.php $ php test2.php
New model name: Test New model name: Test
Table name: test Table name: test
@ -82,7 +81,7 @@ Creating MODEL class ... MODEL class created
Creator build this MODEL class file Creator build this MODEL class file
``` ```php
<?php <?php
/* /*
TPsoft.org 2000-2025 TPsoft.org 2000-2025
@ -155,7 +154,7 @@ class Test extends \TPsoft\DBmodel\DBmodel {
Illustrative example Illustrative example
``` ```php
<?php <?php
require_once __DIR__.'/../src/DBmodel.php'; require_once __DIR__.'/../src/DBmodel.php';