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
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -525,19 +525,24 @@ if($db->has("users")) {
525
525
}
526
526
```
527
527
### Helper commands
528
-
Reconnect in case mysql connection died
528
+
Reconnect in case mysql connection died:
529
529
```php
530
530
if (!$db->ping())
531
531
$db->connect()
532
532
```
533
533
534
-
Get last executed SQL query.
534
+
Get last executed SQL query:
535
535
Please note that function returns SQL query only for debugging purposes as its execution most likely will fail due missing quotes around char variables.
536
536
```php
537
537
$db->get('users');
538
538
echo "Last executed query was ". $db->getLastQuery();
539
539
```
540
540
541
+
Check if table exists:
542
+
```php
543
+
if ($db->tableExists ('users'))
544
+
echo "hooray";
545
+
```
541
546
### Transaction helpers
542
547
Please keep in mind that transactions are working on innoDB tables.
0 commit comments