Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gurpreetkaits authored Oct 30, 2023
1 parent acd6c78 commit 8276f4e
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,49 @@ Simple Wuery Builder is a PHP library that provides a simple and easy-to-use que
composer require robinksp/simple-query-builder
```
# Simple Example Of Execution

```
<?php
ini_set('display_errors', 1);
use robinksp\querybuilder\Connection;
use robinksp\querybuilder\Query;
require 'vendor/autoload.php';
$config = [
'hostname' => 'localhost',
'username' => 'root',
'password' => 'password',
'database' => 'test'
];
$connection = (new Connection($config))::connect();
$selectQuery = (new Query($connection))
->table('award_icons')
->select('*')
->where('id', '=', 33)
->get();
echo '<pre>';
print_r($selectQuery);
Array
(
[0] => Array
(
[id] => 33
[title] => Award
[icon] => award
[created_at] => 2023-10-09 14:59:17
[updated_at] => 2023-10-09 14:59:17
)
)
```

0 comments on commit 8276f4e

Please sign in to comment.