Use paginate() instead of get() to fetch paginated result
Use paginate() instead of get() to fetch paginated result
```php
```php
...
@@ -630,6 +684,7 @@ if (!$db->insert ('myTable', $insertData)) {
...
@@ -630,6 +684,7 @@ if (!$db->insert ('myTable', $insertData)) {
}
}
```
```
### Error helpers
### Error helpers
After you executed a query you have options to check if there was an error. You can get the MySQL error string or the error code for the last executed query.
After you executed a query you have options to check if there was an error. You can get the MySQL error string or the error code for the last executed query.
```php
```php
...
@@ -668,3 +723,27 @@ print_r ($db->trace);
...
@@ -668,3 +723,27 @@ print_r ($db->trace);
)
)
```
```
##Table Locking
To lock tables, you can use the **lock** method together with **setLockMethod**.
The following example will lock the table **users** for **write** access.
```php
$db->setLockMethod("WRITE")->lock("users");
```
Calling another **->lock()** will remove the first lock.