You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ A PHP 7.2+ SQL client and querybuilder for the most common databases.
48
48
{
49
49
"require": {
50
50
"php": ">=7.2.0",
51
-
"chillerlan/database": "dev-master"
51
+
"chillerlan/database": "^2.1"
52
52
}
53
53
}
54
54
```
@@ -185,7 +185,9 @@ method | return | description
185
185
------ | ------ | -----------
186
186
`sql()` | `string` | returns the SQL for the current statement
187
187
`bindValues()` | `array` | returns the values for each '?' parameter in the SQL
188
-
`execute(string $index = null, array $values = null, $callback = null)` | `Result` | Executes the current statement. `$index` is being used in "SELECT" statements to determine a column to index the `Result` by. `$values` and `$callback` can be used to provide multiple values on multi row "INSERT" or "UPDATE" queries.
188
+
`query(string $index = null` | `Result` | Executes the current statement. `$index` is being used in "SELECT" statements to determine a column to index the `Result` by. `$values`.
189
+
`multi(array $values = null)` | bool | Executes the current statement as multi query. `$values` needs to be a multi dimensional array with each row.
190
+
`callback(array $values = null, $callback = null)` | bool | Executes the current statement. `$index` is being used in "SELECT" statements to determine a column to index the `Result` by. `$values` and `$callback` can be used to provide multiple values on multi row "INSERT" or "UPDATE" queries.
189
191
190
192
191
193
### `Create`
@@ -208,7 +210,7 @@ $conn->create
208
210
->database('test')
209
211
->ifNotExists()
210
212
->charset('utf8mb4_bin')
211
-
->execute();
213
+
->query();
212
214
```
213
215
```mysql
214
216
CREATEDATABASEIF NOT EXISTS `test` CHARACTER SET utf8mb4 COLLATE utf8mb4_bin
0 commit comments