mirror of
https://codeberg.org/vlw/php-mysql.git
synced 2025-09-14 00:33:41 +02:00
fix(doc): fix return types for executor methods in README
This commit is contained in:
parent
f35936cea6
commit
244761b1d5
1 changed files with 4 additions and 4 deletions
|
@ -58,7 +58,7 @@ use libmysqldriver\MySQL;
|
||||||
$db = new MySQL($host, $user, $pass, $db);
|
$db = new MySQL($host, $user, $pass, $db);
|
||||||
```
|
```
|
||||||
|
|
||||||
All executor methods [`select()`](#select), [`update()`](#update), and [`insert()`](#insert) will return a [`mysqli_result`](https://www.php.net/manual/en/class.mysqli-result.php) object.
|
All executor methods [`select()`](#select), [`update()`](#update), and [`insert()`](#insert) will return a [`mysqli_result`](https://www.php.net/manual/en/class.mysqli-result.php) object or boolean.
|
||||||
|
|
||||||
# SELECT
|
# SELECT
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ Pass an associative array of strings, CSV string, or null to this method to filt
|
||||||
```php
|
```php
|
||||||
$db->select(
|
$db->select(
|
||||||
array|string|null $columns
|
array|string|null $columns
|
||||||
): mysqli_result;
|
): mysqli_result|bool;
|
||||||
```
|
```
|
||||||
|
|
||||||
In most cases you probably want to select with a constraint. Chain the [`where()`](#where) method before `select()` to filter the query
|
In most cases you probably want to select with a constraint. Chain the [`where()`](#where) method before `select()` to filter the query
|
||||||
|
@ -119,7 +119,7 @@ Use `MySQL->insert()` to append a new row to a database table
|
||||||
$db->insert(
|
$db->insert(
|
||||||
// Array of values to INSERT
|
// Array of values to INSERT
|
||||||
array $values
|
array $values
|
||||||
): mysqli_result
|
): mysqli_result|bool
|
||||||
// Returns true if row was inserted
|
// Returns true if row was inserted
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ Modify existing rows with `MySQL->update()`
|
||||||
$db->get(
|
$db->get(
|
||||||
// Key, value array of column names and values to update
|
// Key, value array of column names and values to update
|
||||||
array $fields,
|
array $fields,
|
||||||
): mysqli_result;
|
): mysqli_result|bool;
|
||||||
// Returns true if at least 1 row was changed
|
// Returns true if at least 1 row was changed
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue