@@ -67,7 +67,7 @@ Example
6767
6868``` php
6969// Creates an database table
70- create('abc_db ',
70+ create('profile ',
7171 // and with database column name, datatype
7272 // data types are global CONSTANTS
7373 // SEQUENCE|AUTO is placeholder tag, to be replaced with the proper SQL drivers auto number sequencer word.
@@ -121,6 +121,8 @@ prepareOff(); // When off shortcut SQL Methods calls will use vendors escape rou
121121// With the same number of arguments in an array.
122122// It will determine arguments type, execute, and return results.
123123query_prepared(string $query_string, array $param_array);
124+ // Will need to call to get last successful query result, will return an object array
125+ queryResult();
124126```
125127
126128#### Example for using prepare statements indirectly, with above shortcut SQL methods
@@ -133,11 +135,11 @@ $values = [];
133135$values['name'] = $user;
134136$values['email'] = $address;
135137$values['phone'] = $number;
136- $db->insert('abc_db ', $values);
137- $db->insert('abc_db ', ['name' => 'john john', 'email' => 'john@email', 'phone' => 123456]);
138+ $db->insert('profile ', $values);
139+ $db->insert('profile ', ['name' => 'john john', 'email' => 'john@email', 'phone' => 123456]);
138140
139141// returns result set given the table name, column fields, and ...conditionals
140- $result = $db->selecting('abc_db ', 'phone',
142+ $result = $db->selecting('profile ', 'phone',
141143 // ...conditionals are comparison operators($column, $value, _COMBINE_EXPRESSION_CONSTANTS)
142144 // these operators are functions returning arrays:
143145 // eq(), neq(), ne(), lt(), lte(),
@@ -152,7 +154,7 @@ foreach ($result as $row) {
152154 echo $row->phone);
153155}
154156
155- $result = $db->selecting('abc_db ', 'name, email',
157+ $result = $db->selecting('profile ', 'name, email',
156158 // Conditionals can also be called, stacked with other functions like:
157159 // innerJoin(), leftJoin(), rightJoin(), fullJoin()
158160 // as (leftTable, rightTable, leftColumn, rightColumn, equal condition),
@@ -178,7 +180,14 @@ foreach ($result as $row) {
178180#### Example for using prepare statements directly, no shortcut SQL methods used
179181
180182``` php
181- $db->query_prepared('INSERT INTO abc_db( name, email, phone) VALUES( ?, ?, ? )', [$user, $address, $number]);
183+ $db->query_prepared('INSERT INTO profile( name, email, phone) VALUES( ?, ?, ? );', [$user, $address, $number]);
184+
185+ $db->query_prepared('SELECT name, email FROM profile WHERE phone = ? OR id != ?', [$number, 5]);
186+ $result = $db->queryResult(); // the last query that has results are stored in `last_result` protected property
187+
188+ foreach ($result as $row) {
189+ echo $row->name.' '.$row->email);
190+ }
182191```
183192
184193## For Authors and ** [ Contributors] ( https://github.com/ezSQL/ezsql/blob/master/CONTRIBUTORS.md ) **
0 commit comments