1- # Lightweight PHP ORM Database [ Fredrick Peterson]
2- [ ![ Total Downloads] ( https://poser.pugx.org/peterson/phpOrmDatabase/downloads )] ( https://packagist.org/packages/peterson/phpOrmDatabase )
3- [ ![ Latest Stable Version] ( https://poser.pugx.org/peterson/phpOrmDatabase/version.png )] ( https://packagist.org/packages/peterson/phpOrmDatabase )
4- [ ![ License] ( https://poser.pugx.org/peterson/phpOrmDatabase/license )] ( https://packagist.org/packages/peterson/phpOrmDatabase )
1+ # PHP ORM Database
2+ [ ![ Total Downloads] ( https://poser.pugx.org/peterson/php-orm-database/downloads )] ( https://packagist.org/packages/peterson/php-orm-database )
3+ [ ![ Latest Stable Version] ( https://poser.pugx.org/peterson/php-orm-database/version.png )] ( https://packagist.org/packages/peterson/php-orm-database )
4+ [ ![ License] ( https://poser.pugx.org/peterson/php-orm-database/license )] ( https://packagist.org/packages/peterson/php-orm-database )
5+ [ ![ Build Status] ( https://github.com/tamedevelopers/phpOrmDatabase/actions/workflows/php.yml/badge.svg )] ( https://github.com/tamedevelopers/phpOrmDatabase/actions )
6+ [ ![ Code Coverage] ( https://codecov.io/gh/peterson/php-orm-database/branch/2.2.x/graph/badge.svg )] ( https://codecov.io/gh/peterson/php-orm-database/branch/2.2.x )
7+ [ ![ Gitter] ( https://badges.gitter.im/peterson/php-orm-database.svg )] ( https://app.element.io/#/room/#php-orm-database:gitter.im )
58
69## Inspiration
710
8- Having be instroduced to Laravel Framework, over the past yr(s), Coming back to vanilla PHP database ,
9- was pretty tough. So i decided to create a much more easier way of communicating with Database.
11+ Having been introduced to learning Laravel Framework; Over the past yr(s), Coming back to vanilla PHP,
12+ was pretty tough. So i decided to create a much more easier way of communicating with Database, using native ` PHP PDO:: Driver ` .
1013
1114
1215
@@ -329,18 +332,18 @@ $db->table('users')
329332 ]);
330333```
331334
332- ### Query
333- - Allows you to use direct ` SQL query syntax `
335+ ### Raw
336+ - Allows you to use direct raw ` SQL query syntax `
334337
335338- 1 usage
336339```
337- $db->query ('SHOW COLUMNS FROM users')->get();
338- $db->query ('DROP TABLE users')->execute();
340+ $db->raw ('SHOW COLUMNS FROM users')->get();
341+ $db->raw ('DROP TABLE users; ')->execute();
339342```
340343
341344- 2 usage
342345```
343- $db->query ('SELECT count(*) FROM users WHERE status=:status');
346+ $db->raw ('SELECT count(*) FROM users WHERE status=:status');
344347$db->bind('status', 1);
345348$db->get();
346349
@@ -620,12 +623,12 @@ $users->showing([
620623## Clause
621624- Multiple clause
622625
623- < details >
624- <summary >Raw</summary >
626+ ### Raw
627+ <details >< summary >Raw Usage </summary >
625628- Allows you to use direct raw ` SQL query syntax `
626629
627630- 1 usage
628- ```
631+ ```
629632$db->table()
630633 ->raw('date >= $date')
631634 ->raw('NOW() > created_at')
@@ -635,9 +638,10 @@ $db->raw('DROP TABLE users')->execute();
635638```
636639</details >
637640
638- < details >
639- <summary >Select</summary >
641+ ### Select
642+ <details >< summary >Select</summary >
640643- Used to select needed columns from database
644+
641645```
642646$db->table('users')
643647 ->where('user_id', 10000001)
@@ -679,8 +683,6 @@ SELECT *
679683 ORDER By CAST(`amount` AS UNSIGNED) DESC
680684```
681685
682-
683-
684686### Latest
685687- Takes one param ` $column ` by default the column used is ` id `
686688```
@@ -1188,8 +1190,7 @@ class PostClass extends DB{
11881190## Useful Links
11891191
11901192- @author Fredrick Peterson (Tame Developers)
1191- - [ Ultimate ORM Database] ( https://github.com/tamedevelopers/phpOrmDatabase )
1193+ - [ Lightweight - PHP ORM Database] ( https://github.com/tamedevelopers/phpOrmDatabase )
11921194- If you love this PHP Library, you can [ Buy Tame Developers a coffee] ( https://www.buymeacoffee.com/tamedevelopers )
1193- - Link to Youtube Video Tutorial on usage will be available soon
11941195- Udemy Course on Usage [ Coming Soon] ( )
11951196
0 commit comments